Configuring Timeout for VISA Sessions

Updated Dec 14, 2017

Reported In

Software

  • LabVIEW Full

Driver

  • NI-VISA

Issue Details

Can I configure or change the default timeout for all of my VISA sessions? And is it possible for the timeout values for VISA Read and VISA Write VIs be different?  I would like to do this without having to set the individual timeout values.

Solution

The default timeout for VISA Read and Write is 2000 milliseconds, but if you wish to change this, the timeout can only be set for an entire VISA session. This means that the timeout will be the same for both VISA Read and VISA Write.

To set the timeout for a VISA session, create a Property Node for the VISA session and select the Timeout attribute from the dropdown menu. The timeout attribute can be defined by wiring the desired value for timeout in milliseconds. This can also be done by using VISA Set Timeout in LabVIEW (located in the Functions palette under Instrument I/O»VISA»VISA Advanced) or the viSetAttribute("VI_ATTR_TMO_VALUEK") function in LabWindows™/CVI™.

The following code snippet shows an example where the timeout is set to 2 seconds:

Additional Information



 

WAS THIS ARTICLE HELPFUL?

Not Helpful