Comm Port And HEX Data

Jan 27, 2010

Basically I need to send the hex command FA through a COM port.

I have added the com port and set the baud etc and all seems to be working well there. I am just a little unsure how to send the correct hexadecimal command. For example,

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click



VB 2003 - Handling Data - Transmitting Data From A Comm Device Via Serial Port

Nov 10, 2009

I'm currently working on a project where I am transmitting data from a comm device via the serial port and resorting the raw data (in binary) to its respective ascii values. The problem I'm facing is determining the most efficient method to accomplish my goal. Essentially, I have 68 bytes coming in, the first and second bytes represent the page and packet number and the data itself ranges from 3 to 64, the remaining for my checksum.

What I am needing to do is, grab 50 consecutive bytes per variable in my array, and that is where I'm confused. I have easily pulled my 3-64 bytes and stored that data to a string. I just don't know the most efficient method to accomplish my goal. Should I write directly to file all my data, as there are like 8 pages, of 128 packet data. [Code] I can capture the the first 50 by using a for-loop easily, but what would be the preferred method to track what data chunk I've taken? The more I think about it, I think I may just want to write to file, all my data, and then just take them back to back in 50 byte chunks. Is that the most efficient method?

View 3 Replies View Related

Comm Port Read Hangs When Attempting To Read Data?

Apr 18, 2010

I;m attempting to write code to read several NMEA ports and format the data for archive. When I execute the following code:

Using Commportno As IO.Ports.SerialPort = _
Dim Incoming As String = Commportno.ReadLine()

View 5 Replies View Related

Create A Logical Comm Port

Apr 29, 2011

Is it possible to create a logical serical port in vb that another application can open and read/write to?

View 2 Replies View Related

Hooking The Comm Port (RS232)?

Nov 2, 2011

I currently have software that sends out plain text(i.e. 'X') to comm 1 port and was wondering if there was any way to capture that plain text and also respond to that port on the same compute as the port without having anything plugged into the machine (i.e. 9 pin serial cable). I am trying to avoid buy any more hardware as this is an objective to acutally cut down on hardware.

View 1 Replies View Related

Serial Port :: Ms Comm Getting Exception?

Nov 27, 2011

I used microsoft com control 6.0 in the application for sending data to the led control

MSComm1.EOFEnable = True
MSComm1.SThreshold = 100
MSComm1.InputLen = 0


View 1 Replies View Related

Proper Syntax For Comm Port Comunication

Dec 31, 2009

Now I know whats going to happen, I will post a request for code syntax and one of the admins is going to say that I need to post the code I already have. The code I already have is irrelevant to what i wish to do. So, continuing on; I have a micro controller that i wish to send commands to it in HEX data type. Communication is via the serial port RS232. (well technically its through the USB to serial converter)Steps:

1) Sending a "001" tells the micro controller to await instructions as to what to set the duty cycle to

2) The data that follows i.e." 050, 010, 185 " will be added to 400 (by the micro controller) to come up with a duty cycle based on a 10 bit resolution of 0-1024. I am only going to be using the range of 401- ~500.

I can communicate with the micro controller via hyper terminal. Using the Alt + #keys method I can transmit data to the micro controller, and this is what i with to do with[code]

View 4 Replies View Related

Read / Write To A COMM Port From An ASP.NET Page?

Feb 22, 2007

I have an older VB6 application which uses a scanner on the COMM port and does the following... (I have been tasked with re-writing it in ASP.NET (VB)...


1.  reads a Scanner and loads the data onto the PC

2. FTP's the data file to a SQL Server (where a small app picks it up and processes it)

3. Deletes the data from the scanner[code]...

View 6 Replies View Related

[2005] UnauthorizedAccessException Accessing Comm Port

May 3, 2006

I'm debugging a VB app where I'm using a comm port attached to a bluetooth radio paired to another bluetooth radio in order to communicate with a remote barcode scanner. The pair of bluetoooth devices basically work as a serial cable replacement. Sometimes it works fine, but after a while I get an UnauthorizedAccessException message which breaks the program (see attached jpeg).

I only get this when I use the radios and not when I use a direct cable. I wonder if it has something to do with other bluetooth devices nearby trying to communicate with mine. I've used the .NET Framework 2.0 Confuration tool to adjust the zone security to give full trust to MyComputer, so I don't think it has to do with security, but I'm really going beyond my area of expertise here. I don't know what's going on.


View 2 Replies View Related

Error Compiling Code For Working With A Comm Port

Apr 8, 2010

I did a search for "How do I implement Serial COM Port communications? and found a response by Xiaoyun Li which was last posted on April 10, 2009. Xiaoyun's response included sample code. My intent has been to get a clean compile on the sample code, then test it, then expand the code into a real application. I am down to a single error message, which I can't figure out how to resolve: "Method 'Public Sub DoUpdate()' does not have a signature compatible with delegate 'Delegate Sub EventHandler(sender As Object, e As System.EventArgs)'." [code]I marked where the error occurs in the code with *** to the right of the error line.The code is attached to a simple form, Form1 which contains a single text box, TextBox1.It appears to me that the code needs a Delegate statement, but I can't figure out how to code it or where to put it.d.

View 3 Replies View Related

Getting Scale Values From A Comm Port Into A Richtextbox Control?

Apr 13, 2012

I am getting scale values from a comm port into a richtextbox control, now as long as the connections and the scale is working great scale readings continuously flow into the control all the time, however when the connections or the scale is turned of the label that displays the weight will give a message saying error.

After 5 seconds I want to be able to give the operator the choice to take scale readings manually. This is my code so far.

Private Sub tmScaleTimer_Tick(sender As System.Object, e As System.EventArgs) Handles tmScaleTimer.Tick
If rtbDisplay.Text.Length = i Then


how do I restart the timer if the interval has elapsed

View 1 Replies View Related

Use COMM Port 2 To Get Information From A Device. .NET Doesn't Support It Though

Feb 9, 2010

I am writing a VB.NET app that has a piece which needs to send a small command to comm port 2 and get the return result. The problem is .NET doesnt have any support for serial communication seems like.

I just need to send the command "headtype" and get the result.

View 2 Replies View Related

Catching And Removing Escape Characters In A Serial Comm Port Program?

May 18, 2010

I have recently developed a serial port communication program to access my hardware firewall and its connected to the device via a converter usb to rs232head plugged to a rs232 to an ethernet cable. this ethernet cable then plugs into the device console port.

my program functions similar to that of TeraTerm. an opensource hyperterminal program written in C++ but i decided to do one for

Alright to cut the story short, i have successfully coded out the program to accept incomming data from the device but however, i'm also receiving ansi escape sequence along with it and i have no idea how i could implement codes to remove these. i have spend 3 weeks trying to look for vt100 emulation codes written in but i found none so far. most are written in c++. here's an image to illustrate the problem which im facing.

The image below is a screenshot taken when the i ran both the programs together. The bottom is tera term 3.1 and the top is my vb project which i made using msdn's example and improved on the codes. basically tera term was able to interpret those escape sequence and display accordingly to that of the vt100 terminal display. I have spent time reading on regular expressions using the inbuilt function regex in visual basic and tried parsing some strings but its not working. i guess its far more complex than i thought.

View 6 Replies View Related

Read The Data From Barcode Weight Scales By Serial Port And TcpIp Port?

Nov 27, 2010

I'm mohammed from Oman ,I'm visual programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port

View 7 Replies View Related

Reading Serial Port Read Data From Serial Port?

Aug 16, 2011

i am a absolute beginner and i want to use vb to receive data from micro controller through serial port using rs232 standards, i found this code to receive the data serially, can any one tell me where should i paste this code, so that the data received will be displayed in message box.Private Sub DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) HandlesSerialPort1.DataReceived


View 9 Replies View Related

COMM-DRV Handshing Protocol?

Jul 15, 2009

What are the possible handshaking protocol available using COMM-DRV for communication through MODEM

View 5 Replies View Related

MCF To Replace Comm Callable?

Mar 9, 2009

I have been writing a COM callable assembly for my current solution allowing unmanaged code some access. I have just been told that I can now start using 3.5 of the framework having used 2.0 for some time.I then came across WCF and was wondering if I could use any of this to create my application api and allow access from anmanaged code.

View 1 Replies View Related

Data Not Going To Serial Port As One Data String?

May 25, 2009

I have to send the user-input data to the serial port. From the serial port the Modbus controller reads the data in Modbus/RTU mode.Now consider the following:Private WithEvents sp as serialport Now when I send sp.Write "192" to the serial port, I was that the complete data go as one data packet. Instead what I find that when this data is sent to a hardware controller, I find that the serial port first transmits 1, then 9 and then 2. Because of this my modbus does not recognize this data and throws and error. I tried sending "12" and again i find that it goes as "1" and then "2". Is there any way to send the data as one data packet so that my modbus can read "192" as one data packet value and not as 3 data packets of 1, 9, and 2?

View 3 Replies View Related

Multi Threading With Comm Object

Jun 20, 2012

We working with a Modem type interface that use's the Comm port for two way communication. The App starts and sets up the Comm port, and sends config info to the 'Modem'. Trick here is you have specific timing issues that need to be considered, and we got it all sorted, by using Threading.

You send The Config command to the modem and wait X ms for the confirmation reply (Single Byte), If no reply, send a Wake up command, wait X ms and send Config command again. Once confirmed that the modem is in config mode, send parameters, Waiting for confirmation of each one. Once config is set, send the 'Return to normal mode' command and wait for confirmation. [Code]

The SwitchModemMode sub runs under the Comms thread and not the main thread, like the Checkmodem sub at the top. Mostly because the Comms thread Raises the Data Event, which in turn calls the SwitchModemMode. Now because of that the Thread that is supposed to be checking for the input and setting the Flag, is actually the one waiting for the Flag to be set. And Yes App.DoEvents could solve it here, however that can/will mess with the Timing needed with these commands. I'm looking for how to pass the Raised event to the Main thread.

View 1 Replies View Related

VS 2008 Multithread With Comm (bass Visualisation)?

Jan 21, 2010

I have a thread executing the following:

Do UpdateVis()
UpdateVis is as follows:


View 3 Replies View Related

Read Individual Char In TextBox And Send To Comm?

Apr 11, 2011

May I know instead of using WriteLine(MyTextBox.Text) to send data to a serial port, how do I send character by character? Use BaseStream.Write?


Dim ComLine As Ports.SerialPort

View 3 Replies View Related

Getting Data From COM Port?

Jun 24, 2010

getting data from COM port. I can't the the moRS232.Read(128) code working in my project. And i get my rs232 class from Attached is my VB project if u need it for reference.

here is the

Private Sub FindDistance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindDistance.Click
' Initializes and Open


View 6 Replies View Related

How To Get Data From A USB Port

Feb 15, 2012

I have developed a software for managing the details of patients, the software stores the data into MSsql database..However, the data I need to get stored has to be read from an external device which transmits data... Now my query is how I can read that data using VB.NET 2010.I have searched on net and found that I can use My.Computer.Port to read data from USB connected device, but I am unable to get its logic and any example to get this practically done.I also been through many books to understand the practical way of doing this, but not yet resolved with anything.

View 3 Replies View Related

Getting Data From Serial Port

Jan 30, 2011

I am facing problem reading data from Serial port. Actually I am connecting with the hardware device called Crimp Force Analyzer. It gives the data on hyperterminal and I have to read that data from my <acronym title="Visual Basic">vb</acronym>.net program. The data is somewhat like this:


View 8 Replies View Related

How To Read Data From USB Port

Oct 15, 2011

In My application I need to retrieve/Read data from USB port. Is it possible to Read data from USB cable?

View 3 Replies View Related

How To Read Data From Usb Port In .net

Mar 3, 2009

how to read data from usb port in

View 1 Replies View Related

Read Data From Usb Port In .net?

May 27, 2010

how to read data from usb port in

View 2 Replies View Related

Read The Whole Data From COM Port?

Nov 17, 2009

When using the SerialPort component in VB.Net, and when the event DataReceived occurs, and if we assume that the com port read 13 digits (Bar Code), how to read the whole data received (i.e. 13 digits) while in event without letting the event repeats 13 times and write the 13 digits AFTER COLLECT THEM in a text box (I don' want to write one-by-one digit in the textbox, all at once)

briefly: I want to read the whole data from COM port at once and write the whole data (not digit-by-digit or byte-by-byte)to a textbox.

I know it is SERIAL port but I want to write the 13 digits PARALLEL to a textbox!

View 4 Replies View Related

Send Data To A USB Port?

Jun 9, 2012

how to send data to a USB port.

View 1 Replies View Related

Access And Send Data On USB PORT?

Nov 21, 2011

I am currently doing a program to control some device via usb port but i don't know how to interface the usb port using i want to send data on a device to make it act like parallel port..

View 10 Replies View Related

Access Com Port And Sending Data

Nov 9, 2011

have gps constantly sending data but can read it from the com port

View 5 Replies View Related

C# - Read A XML Data From TCP Port Socket

Jun 2, 2010

I have a device which send me data over a particular port. The data is in XML Format.

Now I already did a small console application which listen for the data and print out the data on the screen.

Now my plans are to deserialize the xml data or I will create the insert statement into the database.

1) The device send me the data every second (if there is data to send me).

2) I cannot say how much data the device is going to send me.

How can I make sure to capture all data without loose any information..

View 2 Replies View Related

Connect To Serial Port And Get The Data From That Using VB

Jan 12, 2012

I want to connect to serial port and get the data from that using how to do this.........

i have found one sample and i tried that but in that datareceived event is not firing

View 1 Replies View Related

Data Input From The Serial Port?

Jul 15, 2008

how to write code to read data from the serial port.  I have a microcontroller connected to the serial port and I need the C++ program to read the input and to perform a certain task according to the information.

View 19 Replies View Related

Data Logging Through Serial Port For Gps

Apr 8, 2010

Data Logging Through Serial Port For Gps

View 1 Replies View Related

Display Serial Port Data?

Nov 6, 2011

I want a text box in my application that will display the data currently coming from the serial port,So if i will send ascii "hello" from another computer on my program it will diaplay "hello".

View 23 Replies View Related

How To Read Data From Serial Port

Jan 3, 2010

I am trying to read data from rfid tag using rfid reader. i can connect reader, but cannot get data?

View 4 Replies View Related

Read Data From Serial Port?

Apr 2, 2012

I am using a VB.NET(VS2010) to read data from serial port. I have 8-bit data to collect through rs232. This data is represented numbers. What reading method should I use and how to convert it to double format?

View 4 Replies View Related

Read Data From The Serial Port?

Nov 12, 2009

I need to read data from the serial port Ive used serialport from the toolbox , but dont know how to use it. I used to do it on a Amiga like this

open serial("serial.device".0.2400.0) rem(open port)
repeat GW.w=readserial(0)
if gw>29 and gw<128


View 1 Replies View Related

Reading Hex Data Through The Serial Port?

Oct 27, 2009

I am having a little trouble receiving data via the serial port. I can send just fine. I am using Serial Port object.

Basically my data expected is in the form of: [0x43 0x35 0x64 0x35...] broken up into bytes. I tried using the SerialPort.Read() function but can't get it to work.

View 8 Replies View Related

Copyrights 2005-15, All rights reserved