Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Serial baud rate mismatch

Solved!
Go to solution

Hi guys,

 

I have a vi to read GPS parameters via Serial port. First I configure the serial port, then I write some configuration parameters via Serial and then I start getting messages with position, velocity, time, etc.

 

The producer is a timed loop. It reads everything in the serial port each 100ms and sends it to the queue. The GPS generates the messages at 100 Hz, so each loop I have 10 values of data each iteration.

 

The consumer gets the messages and converts strings to final values.

 

This works well at 115200 baud rate, but when I change to greater values such as 460800 (both the receiver and the serial port can take greater values), I start getting the messages grouped each 4 loops (in the 460800 example). I mean, I get 40 values of data one iteration (it should be 10), then 3 iterations without any data, then 1 iteration with 40 values, and so on.

 

460800 is four times 115200, so I must be doing something wrong, but I don't know what. Both the serial port and the receiver are properly configured at 460800, am I missing something else that should be configured?

 

Thanks!

Best regards,
Néstor

LabVIEW 2017 + Windows 10
0 Kudos
Message 1 of 4
(4,817 Views)

I am guessing, but I wonder if the OS is handling things in batches or chunks?  If you are getting 10 messages every 100 ms, what is the advantage of going to the higher rate?

 

Lynn

0 Kudos
Message 2 of 4
(4,795 Views)

Hi Lynn,

 

thanks for answering 🙂

 

115200 wasn't fast enough for the number of characters we need to get, we started getting delayed messages.

 

What do you mean exactly with the OS handling things in chunks?

Best regards,
Néstor

LabVIEW 2017 + Windows 10
0 Kudos
Message 3 of 4
(4,773 Views)
Solution
Accepted by topic author JoePerkins

Ok, I have the solution. I had to lower the latency in the advanced configuration of the serial port from 16 to 4 ms.

 

Hard to find!

Best regards,
Néstor

LabVIEW 2017 + Windows 10
Message 4 of 4
(4,747 Views)