LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa Serial Write Delays

Solved!
Go to solution

Hello,

 

I am using the LabVIEW Serial Vi's to send commands to a DUT. I am using the a Sparkfun USB to Serial cable for the interface, directly connecting to the TX and RX pins of my DUT (an MCU). I am able to send and receive data without any problems or data corruption, It is just really slow.

 

There is up to a 5 second delay in between seing the message get written to the Serial Write VI and me actually seeing it post to the MCU. I have a scope attached to the TX/RX signals to see when this occurs. Luckily I am only doing 2  writes of 4 bytes, so there is only an additional 10 seconds of delay, but with it being wrapped in a teststand sequence, the delays will add up over the hundreds of iterations. 

 

Has anyone seen this before? Any Ideas of what I might be able try?

 

Thanks.
Mark

0 Kudos
Message 1 of 2
(2,772 Views)
Solution
Accepted by topic author mlabbato

Well, The post was premature. A co-worker pointed out my error. 

 

I am using 2 queues, one for reading, one for writing to the serial port. The issue is that I am using the VISA Read.vi timeout for the read queue loop, and the Dequeue Element.vi for the write loop. By accident, I had configured the Serial Read timeout to be 10s. Since the Serial port is the same VISA session, These aren't truly independent queue loops. the Serial Read function was blocking the write function from occuring for at least 10 seconds. once the Read Vi timed out, the write was able to sneak in and get the message written.to the port.

 

-Mark

0 Kudos
Message 2 of 2
(2,756 Views)