473,320 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 1606
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

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

Similar topics

1
by: mimisam | last post by:
hi, I am using Win XP and writing an application to check POS devices (printer and cash drawer).In the application I need to choose the port which the device is connected to. If the port chosen...
2
by: fdunne2 | last post by:
Hi, I need to interface a signal generator with my computer's serial port ( to set the frequency, level etc using the appropriate byte codes). How can I send and receive (acknowledge the message...
1
by: Mike | last post by:
Sorry, don't know if this is the correct board for my question. I'm a novice so I guess I have a valid excuse My question : I'm using Visual C++ and I need to collect data from a serial port. ...
0
by: QuangPK | last post by:
we have a project to transmit and receive data on serial port (i modify it from VCTERM on MSDN). To transmit text byte I use : void CMainFrame::TxString(CString str) { CString s; VARIANT...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
5
by: Tony K | last post by:
I have a slight problem. When attempting to receive data via my serial port I sometimes do not get the complete data. For example, I have a scanner that reads barcodes. When reading barcode...
2
by: Lou | last post by:
I have a class that creates an instance of the seril Port. Every thing works fine except whenever I receive data I cannot display the recieved data. I get no errors but the recived data seems to...
6
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send...
2
by: mmrasheed | last post by:
Hi, I am newbie in python. I am working on Telit GM862 GPS/GPRS module which has python interpreter built in. But it seems this problem is pretty much related to general python structure. I...
7
by: seegoon | last post by:
Hi to all. I have a application that receives data via the serial port. I don't know the number of bytes that are going to be coming in. It could be 10 up to 150. (9600 baud) I have decided to...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.