LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB COM port read garbage Bytes

We have configured USB COM port at 625000 baud rate and reading the data continously. When the COM port is read for long time, see some garbage bytes inbetween valid data. Could somebody help what could be the problem?

0 Kudos
Message 1 of 6
(3,847 Views)

Could be a lot of things. How long do you need to run to see this, how much "garbage" are you seeing. How is the serial adapter connected to the other side? Are you using shielded communication wires? How long is this wire? What environment is it running through? Is it running near any electric motors, switch gear, etc.?  625K baud is a pretty fast rate, translating to some where near 4 - 6 Mbits/Sec, What mode are you using,  RS232, RS422, RS485?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 6
(3,832 Views)

Most of the time value 00 gets inbetween. This garbage value comes one are twice.

After reading the COM port for more than 1 hr this problem happens.

Labview tool runs on windows XP.

The connection from hardware to PC is as below.

1. From hardware RJ45 connects to RS232 connector.

2. Then RS232 cable connects to RS232- USB convertor.

3. The RS232-USB convertor is connected to PC as virtual COM port.

 

No electric motors or such kind in between. The wire could be nearly 1m long.

 

0 Kudos
Message 3 of 6
(3,821 Views)

1m is a trivial length, doubt that causing any problem. I am a little suspicious of the USB-Serial adapter. With an "old school" serial port it was generally hardware until the OS read the buffers where the incoming data was being "stored". Not sure with the USB version, suspect that there is little hardware buffering, and with anything in a non-realtime OS (Windows) a interrupt that puts the USB task in a lower priority and you could have and issue, although figure it would drop data rather than add it.

 

 

--- Pondering ---

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 6
(3,804 Views)

Could you suggest me a solution so that the interrupt in OS doesn't lose any data while running in low priority?

0 Kudos
Message 5 of 6
(3,778 Views)

Can you post the code you are using for capturing the serial data. Or a screen capture of the block diagram, in .png format (NOT .bmp, they are too large a file).

 

Also, what is happening with the data, are you displaying it, parsing it and doing something with that, what?

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 6
(3,766 Views)