LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

port overrun error while reading data in queue

I am trying to read data from various wireless sensors(5-6 in number)  which are communicating with my PC using rs232 port.

the size of data from each sensor that i am getting is 39 bytes.

I want to extract some bytes of these data for which i am using a string subset function.

Now the issue is due to the high baud rate i am not able to read data from each of them individually because before one set of data is worked on another set arrives and port overrun error occurs.

I am trying to do this using queue but could not find a possible solution.

0 Kudos
Message 1 of 3
(2,189 Views)

This shouldn't be a difficult problem, as serial communication is "slow" (compared to the speed of the CPU).  You want to take advantage of LabVIEW's parallel nature and have each of your Serial devices running in parallel, taking 39 bytes of data and passing it to an "Extract useful information" subVI.  Note that you can use the same subVI for each of the 6 lines, and the time it takes to "extract the useful information" (by doing some string parsing) should take no more than a few microseconds, so it can easily be "shared" by all of your serial devices.  Alternatively, you could make this VI reentrant, so a separate and independent copy would be assigned to each device, again allowing parallel operation.

 

If you are still having problems, post some code.

0 Kudos
Message 2 of 3
(2,170 Views)

how can the problem be solved through queue ...... I am attaching my VI .. This might give you a grater detail of my problem

0 Kudos
Message 3 of 3
(2,152 Views)