|
-
Sep 11th, 2012, 12:05 PM
#1
Thread Starter
Junior Member
Visual Basic 2010 express will not recive data
Hi All
I’m making a VB program to handle some RS232 ASCII data, and I’m new to VB but learned basic ~25 years ago, and pick things up fast if I have examples.
I have set up the program and form1 using the Components barand added SerialPort1.
I have the TX function working just fine and can send control chars or ASCII text
no problem but I cannot get the thing to receive the ASCII data it is being sent.
The data is getting to the PC I can see it on a scope, I have tried to use the examples I have found but none of them work.
Would anyone have a little bit of code I could use to read the port data and save it as a string.
When sending I use
SerialPort1.Open()
SerialPort1.WriteLine(“1”) for text
SerialPort1.Write(Chr(27)) to send control chrs “ESC”
SerialPort.1Close()
I’m pretty sure I need to use SerialPort.Write for data and SerialPort.WriteLine for text, but I’m Stuck !
Thanks for any help you can offer.
Gord
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|