LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port vi taking too much time to communicate?

i am using visa vis for serial communication the read vi takes too much time to give me the bytes at serial port.what should i do to decrease the delay?
0 Kudos
Message 1 of 2
(2,464 Views)
ARL:

What time exactly are you measuring? If you query the number of bytes available at the serial port, that should be pretty much instantaneous. If you then wire that to the VISA Read function, then reading that number of bytes is pretty much a function of the actual number of bytes and the speed of your CPU, and should not be related to the baud rate since these bytes are already in your input buffer on your computer.

For example, reading 17KB on a machine here (NT4, 266MHz) took 300 milliseconds regardless of the baud rate and regardless of whether it was synchronous or asynchronous. Do you consider that too long? If you are using Windows, what amount of time does NI Spy show the call took?

If you are using a version of NI-VISA older than 2
.5, you might want to upgrade. There were some performance issues with older versions.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
0 Kudos
Message 2 of 2
(2,464 Views)