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 codeworks.it. 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
[Code]......
View 6 Replies
ADVERTISEMENT
Nov 27, 2010
I'm mohammed from Oman ,I'm visual studio.net programmer How I can Read the Data From Barcode Weight scales By Serial port and TcpIp port
View 7 Replies
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
[Code]...
View 9 Replies
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
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
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
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
SerialPort1.Open()
[Code].....
View 4 Replies
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:
[Code]....
View 8 Replies
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
Mar 3, 2009
how to read data from usb port in vb.net
View 1 Replies
May 27, 2010
how to read data from usb port in vb.net
View 2 Replies
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
Jun 9, 2012
how to send data to a USB port.
View 1 Replies
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 vb.net. i want to send data on a device to make it act like parallel port..
View 10 Replies
Nov 9, 2011
have gps constantly sending data but can read it from the com port
View 5 Replies
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
Jan 12, 2012
I want to connect to serial port and get the data from that using vb.net how to do this.........
i have found one sample and i tried that but in that datareceived event is not firing
View 1 Replies
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
Apr 8, 2010
Data Logging Through Serial Port For Gps
View 1 Replies
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
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
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
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
[Code]....
View 1 Replies
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
Jan 5, 2009
I am trying to recieve HEX data from a seriall device. Code is as below . but the required output is not correct. Some chracter code are not correct even in decimal . like for 80 i recieved 3F and for c0 also.for example i recived a string .
10 02 3F 00 10 03 3F 61
but in actual data should be
10 02 80 00 10 03 c0 61
[code].....
View 2 Replies
Nov 30, 2008
i was not getting o/p properly when i tried to receive data from serial port using the following code.
Public Class form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If SerialPort1.IsOpen Then
[code]....
View 4 Replies
Jan 24, 2008
I am trying to send and receive data through a USB port on my computer to an external microcontroller.
I built most of the code using the "serial class" but then i read that this would not work with a USB port.
How would I go about communicating with this USB port on my computer?
View 5 Replies
Apr 23, 2009
I'm working on a project that involves sending information through a GSM module, this module is connected to the system through a USB port. the information to be sent is gathered from a database using VB, now I need to send the information from my VB program to the USB port for onward delivery to the GSM module.
View 2 Replies
May 1, 2010
i am doing a project in vb 2008 .net.during execution of the code, a different number is generated every second. the numbers are either 0,1,2,3,4, or 5. how do i send this number every second to the serial port. at the serial port i have a microcontroller connected which should accept this number and light up an LED coresponding to the number received.
View 1 Replies
Mar 1, 2010
I am trying to send a command through my serial port to a external device. The format of the command frame is, more or less, like this:
'0x0A 0x03 0x20 0x00 Checksum'
What I've written on my code is just this:
VB code
num_dec = &HA + &H3 + &H20 + &H0
checksum = DecToHex(num_dec) '2D
data=&HA & &H3 & &H20 & &H0
SerialPort_RFID.Write(data & checksum)
The problem is that when I stop the program on the Serial...Write line, I see that the data I sent is on integer format instead of Hex format.
View 8 Replies