Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA read stops and hangs randomly, then continues but no errors are reported

I have two serial write/reads running through some USB ports on my computer. Sometimes after about 2min of running the computer/program will appear to pause, the LEDs on the usb-serial connectors stop flashing (they flash rapidly when in use) and the program hangs for a second or five, then resumes as if nothing happened. This happens at random intervals it seems, and my data is lost for that time period on the graphs and in the data file. there is no error thrown or anything like that. Why could this be happening and how can i prevent it?

0 Kudos
Message 1 of 3
(3,559 Views)

Are you sure that no errors are being thrown?

If an error is occurring at one of the VISA Write or Read functions in the bottom while loop it would not be seen unless the error cluster is passed to an error handler or the error cluster wires are removed to allow for automatic error handling. Implementing more robust error handling might shed some more light on the issue.

 

Cheers,

Doug

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,526 Views)

The default serial timeout is 10 seconds. Are you sure the remote devices are both sending data during the pauses?

 

Lynn

0 Kudos
Message 3 of 3
(3,502 Views)