472,143 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Question Receive wrong caracters from Serial Port

I need to communicate with a PLC in serial port. PLC sends 4 possible data: 0, 1, 2 or 3 (which are status).
My vb.net program uses IO.Ports.SerialPort class. When I read the data, the "1" and "2" are good, but the "0" and "3" are received as "?". I tried all the Read method (ReadByte, ReadExisting, Read, etc), it always give the same result. In HyperTerminal, it's fine.

I made a test program in another computer (Win 7). Test was perfect, I received all 4 status correctly. I ran the same test program on the original computer (Win XP) and once again, I got the "1" et the "2" but the "0" and the "3" was "?" (ascii 63).

anyone have an idea?? because I'm really puzzled here.

thanks a lot for your time and help
Dec 15 '11 #1
2 1545
Killer42
8,435 Expert 8TB
I believe you should post this question in the VB.Net forum. This one's for the (very old) VB 4, 5 and 6, which work quite differently.
Dec 18 '11 #2
Killer42
8,435 Expert 8TB
P.S. It's not that anyone would refuse to answer your question here, it's just that you may not find people with the right expertise. I'm not familiar with VB.Net at all.
Dec 18 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by mimisam | last post: by
2 posts views Thread by fdunne2 | last post: by
reply views Thread by QuangPK | last post: by
13 posts views Thread by Al the programmer | last post: by
5 posts views Thread by Tony K | last post: by
2 posts views Thread by mmrasheed | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.