From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Mac VISA/USB : STB timeout bug?

Hi,

 

I appear to have run into a bug in the Mac USB implementation of the VISA STB (Read Status Byte) function. If I set a long session timeout, the VISA STB function waits that long to return, even if the instrument returns the status quasi-instantaneously. With the default timeout value, all is well.

 

This is not the behavior under Windows. 

 

As a work-around, I restore the default timeout before reading the STB.

-- Philip 

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

Hi,

 

sorry for the late reply! 

Can u post your code please?

Which VISA-Version are you using?

 

 

regards

Marco Brauner NIG

0 Kudos
Message 2 of 3
(3,266 Views)

Dear Hans,

 

Thanks for the reply. Just so you know: in the meantime, I have also posted a support request by e-mail (Reference#7209437), which went to NI Switzerland (Laurent Pollara-Brevart) who has forwarded the question to the US.

 

I am using LabVIEW 8.5.1. I am attaching our low-level VI that writes a command and reads the response and any errors, plus its sub-VIs. If you use the default command (*IDN?), it should work for any IEEE 488.2 compatible instrument. In this version, I change the timeout value on the VISA session just before calling the VISA STB function; by default, I have it at 10 ms. You can play with this value, and observe that the VISA STB takes exactly that amount of time to return.

 

Thanks again,

-- Philip 

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