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.
Error -1073807339 occurred at VISA Read or VISA Write.
VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.
There are several reasons why you might receive this error message, the most common of which are detailed below:
A) You may not have the correct driver installed. Ensure you have the right driver for your hardware. Some common ones are:
B) The port isn’t connected, the wrong port is selected, or the port is not being able to send/receive data. Check the instrument is properly plugged in to the port you're using.C)Try a different system with the same drivers. The COM ports could be corrupted or not working in the original machine.
D) A timeout error could also result from the wrong command strings written to the drivers. Check the command strings sent to the VISA Read and VISA Write calls and ensure that they are written in the proper syntax for your instrument.
Note: A new line or carriage return is often required at the end of a command. A good way to test this in LabVIEW is to right-click the command string control on the front panel and change the display to '\' Codes Display mode. In this mode, a carriage return is \r, a line feed is \n, and an end of line is \r\n. Consult your product's manual to learn which is expected, and be sure to consistently use the appropriate option.
E) The port's communication settings may not be configured correctly. Verify that the Baud Rate, Data Bits, Parity, Stop Bits, and Flow Control are set correctly to correspond with your hardware requirements.
Note: You can change these settings programmatically during run-time with VISA VIs, or in NI-MAX as in the example below:
F) This error may be induced by attempting to read more bits than are available at the serial port.
Note: If you still receive the error while reading only 1 byte, verify the command to make sure it has been written correctly and that you have also terminated the command string correctly (as brought up in solution C).
G) 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, and implement a Wait function between VISA Write and Read to effectively avoid a potential timeout error.
H) Timeouts can also occur when you read or write large amounts of data, since large data sets often take longer than the default timeout period of 2000 ms to transfer across the serial port. You can manually designate the VISA Session Timeout in different ways, depending on your development system. Please see below for instruction on setting the VISA Timeout:
LabVIEW: You can use VISA Set Timeout located in the Functions palette under Instrument I/O » VISA » VISA Advanced. Refer to Configuring Timeout for VISA Sessions.
LabWindows/CVI: You can use the viSetAttribute function with its Attribute_Name parameter is set to VI_ATTR_TMO_VALUE.
Note: Changing the Timeout value for your VISA session will affect all VISA Writes and Reads in your session. However, you are able to set this property/attribute at any point during the session, allowing you to configure it as needed.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.