From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Write Function Delay

I am sending 300 to 400 bytes of GPS data out the serial port at 9600 baud every second. Whenever I send this data Labview will pause at the VISA Write Function until all the bytes of data are sent. This takes approximately 300 to 400 milliseconds. I am running in the asynchronous mode and have the send buffer set at 4095 bytes. Is there anyway that I can avoid this costly long pause?

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

Each byte takes about a millisecond at 9600 baud. So it will take that long to send that much data.

 

What else are you trying to do while the data is being sent? If we have the big picture, someone may be able to suggest an alternative.

 

Lynn

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

If you use a producer/consumer pattern you can queue up a send-message and it'll handle it in another thread, freeing up the 1st thread.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(2,246 Views)