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.

VISA Error -1073807339 (0xbfff0015) Timeout Expired Before Operation Completed

Updated Jun 10, 2020

Reported In

Software

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

Driver

  • NI-VISA

Operating System

  • Windows

Issue Details

When I try to communicate with my instrument in LabVIEW or in VISA Test Panels, I get the following error: 
 

Error -1073807339 occurred at VISA <function name>.vi
Possible reason(s):
VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

 

Solution

This is a generic timeout error that can be caused by different factors. Follow the troubleshooting steps below to resolve the error. 
 

Test communication in VISA Test Panels

Instructions can be found in Testing Communication with your Device Using VISA Interactive Control

If you experience issues in VISA test panels, 

  1. Make sure you are using the correct command syntax by referring to your instrument’s user manual.
  2. Check if you need termination characters by referring to your instrument’s user manual. 
If termination characters are required, make sure Enable Termination Character is selected in the VISA test panel. 

 
  1. Make sure your hardware and software is set up properly for communication by following the steps in MAX Timeout Error with Info Code MAXVISATimeout Error.
  2. Perform a Serial Loopback Test. This can highlight problems in the serial port, the cable, or the software generating the messages without having to connect to third party hardware.
  3. If you are still not able to communicate with the instrument in VISA Test Panels, create an I/O Trace report of a query execution and contact NI Support.
Once you have confirmed that basic communication can be established in VISA Test Panels, move on to troubleshooting in LabVIEW.
 

Test Communication with Shipping Example

The shipping example Simple Serial.vi can be found in LabVIEW Help >> Find Examples >> Hardware Input and Output >> Serial.

  1. Make sure to set the Serial Settings to match the instrument’s requirements. Refer to your device’s user manual if needed. 
  2. If you experience communication issues with the shipping example, contact NI Support
 

Troubleshoot Your LabVIEW Application

  1. Reduce your code to the smallest reproducible case. 
  2. Make sure you are using the correct command syntax by referring to your instrument’s user manual. 
  3. Make sure you are configuring the termination character correctly by referring to your instrument’s user manual. Without a termination character, the device may not know the message has finished and does not return a response. 
 
If termination characters are required, enable and configure the termination character with VISA Configure Serial Port. For more information about termination characters, refer to Termination Characters in NI-VISA.
 
  1. Make sure you are configuring the display style correctly to instruct LabVIEW how to interpret characters (Normal, ‘\’ Codes, Password, Hex). Refer to your instrument’s user manual to see what is expected. 
The default style is set to Normal. If you want to use a different display style, enable it by right-clicking on the string control or constant >> Properties >> Display Style.
 
  1. Make sure the data read is limited to exactly the amount of data available. The error may be caused by NI-VISA attempting to read more bytes than are available at the serial port. 
1.    Drop a VISA Bytes at Serial Port property node on the block diagram and wire the VISA session to its reference input. 
2.    Wire the Bytes at Port output to the Byte Count input of VISA Read. 
 
  1. Make sure you are not trying to read too many bytes by setting the Byte Count input of VISA Read to 1 so you are only reading 1 byte at a time.
If you do not get the error when doing so, increment the number of bytes you read until you get the timeout error again. This tells you how many bytes that command sends back. 
 
If you still receive the error while reading only 1 byte, verify steps 2 and 3 in this section.  
 
  1. Manually designate a timeout by using the VISA Set Timeout and referring to Configuring Timeout for VISA Sessions
 
  1. If you installed a third-party instrument driver, follow the steps in After Installing 3rd Party VISA Software NI VISA No Longer Works to make sure NI-VISA is the primary implementation of VISA on your system. 
 
  1. If you are using older instrumentation, try implementing a Wait function between VISA Write and Read. 
 
Older instrumentation may not respond rapidly to commands written to the port, causing a large delay between VISA Write and VISA Read commands. Applications designed to interface with this type of instrumentation should anticipate this delay. 
 
  1. If you are still experiencing issues, generate the following items and contact NI Support for further troubleshooting. 

Additional Information

Another option to communicate with your instrument is to use the LabVIEW instrument driver that the manufacturer provides, if available. You can search for available instrument drivers on NI IDNET or the manufacturer’s website.