Hi All
Im making a VB program to handle some RS232 ASCII data, and Im 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()
Im pretty sure I need to use SerialPort.Write for data and SerialPort.WriteLine for text, but Im Stuck !
Thanks for any help you can offer.
Gord
Im making a VB program to handle some RS232 ASCII data, and Im 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()
Im pretty sure I need to use SerialPort.Write for data and SerialPort.WriteLine for text, but Im Stuck !
Thanks for any help you can offer.
Gord