This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Configuring Timeout for VISA Sessions

Updated Apr 1, 2026

Reported In

Software

  • LabVIEW Full

Driver

  • NI-VISA

Issue Details

  • Can I configure or change the default timeout for all of my VISA sessions?
  • Is it possible for the timeout values for VISA Read and VISA Write VIs be different?
  • What does the VISA timeout value represent and how can I set it?

Solution

The default timeout value for the VISA Read and VISA Write functions is 2000 milliseconds (or 2 seconds). The timeout value is configurable using VISA Set Timeout.

 

To modify the timeout value, 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. Placing the VISA Set Timeout function (located in the Functions palette under Instrument I/O»VISA»VISA Advanced) implements these steps automatically. If using LabWindows™/CVI™, the same can be achieved by using viSetAttribute("VI_ATTR_TMO_VALUEK").

 

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

 

Additional Information

The timeout value represents the maximum time to wait for each VISA request within a given session. This means that the timeout is the same for both VISA Read and VISA Write within a single session.

 

For example, if setting the timeout to 500, the VISA Read function will wait a maximum of 500 milliseconds to receive a message. A corresponding VISA Write function on the same device will wait 500 milliseconds to complete the operation before producing an error.