LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial read/ write primitive slow in 2016 compared to 2012

Solved!
Go to solution

Thanks for the response. I failed tro mention the baud rate of 460800. The 20 ms is NOT between command / response (which is completed in less than 4 ms) but between consecutive write/read sequences. This seems to indicate that the HW is able to handle the rate, unless the 20ms is needed for the HW to re-configure from read to write mode. I'll try a test case in full duplex mode where the TX is wrapped back to the RX lines to observe if the delay is maintained.

0 Kudos
Message 11 of 13
(706 Views)

If you're using a USB-to-serial adapter, the delay may be introduced by that. FTDI chips, for example, are by default configured to wait for a certain amount of time after receiving any bytes before transferring them to the PC. It looks like the default setting is 16 ms. Here are a few links:

http://www.ftdichip.com/Support/Knowledgebase/index.html?an232b_04adjlatency.htm

http://www.ftdichip.com/Documents/AppNotes/AN232B-04_DataLatencyFlow.pdf

 

Message 12 of 13
(699 Views)

That solved it! The "Latency Timer" in the port properties (Advanced) setting was set to 16 ms. Changed it to 1 ms and things are screaming now. Thanks for sharing your experience, it would have taken me a while to get to there. Case closed and hopefully this will help someone else in the fuiture as well. 

0 Kudos
Message 13 of 13
(696 Views)