Quantcast
Channel: VBForums - COM and ActiveX
Viewing all articles
Browse latest Browse all 62

Visual Basic 2010 express will not recive data

$
0
0
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

Viewing all articles
Browse latest Browse all 62

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>