Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Session Timeout

I am trying to communicate with a Hanna Instrument pH meter using a serial port. The device responds well enough in both labview and hyperterminal, but once in a while, I get this error:

VISA error -1073807339: VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

and the loop is delayed by the error message. I know I'm appending a CR (as specified by the instrument manual) and that the instrument is reading my commands and I'm reading what it's sending, most of the time. Could it be that the instrument cannot keep up with the rate that commands are being given? Can anyone tell me why this is happening and/or any other information that might be useful in troubleshooting.

Thank you.
0 Kudos
Message 1 of 3
(4,209 Views)
Do you have a wait ms in your loop to prevent it to run at 100% cpu time?
if so try to set it to the same value or slower as the update rate at the front of the pH meter.
In essence pH changes are slow (compared to pc's) and pH instruments have to measure over a giant resistance.
So yes I expect that the instrument fails to see your question and does not respond.
greetings from the Netherlands
0 Kudos
Message 2 of 3
(4,191 Views)

I do not think the error is the cause of the delay in your loop. In fact, it is due to the delay you get this error message.

Every VISA Session has a timeout and the default value for this is 2000 ms. I suggest you explicitly write some higher value to the timeout property and perhaps this would solve the problem.

Here is how:

http://digital.ni.com/public.nsf/allkb/E4F90AD24DEC9CC786256F4300605C02

 

Here is some related info based on the same context, I suggest you read this as well.

 

Thanks,

Shameel

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