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.
I am outputting a sequence of characters from a third party device at a fixed interval and reading it using a VISA Read VI. However, I get this error when reading:Error -1073807253 occurred at an unidentified locationPossible reason(s):VISA: A framing error occurred during transfer.
Error -1073807253 is a framing error. Serial data is transferred one byte at a time. Each byte has a specific format with a start bit, data bits, parity, and stop bits. A framing error occurs when a byte of data is received, but it is not in the format expected. This kind of error may occur for several reasons:
A. The port may not have completely finished its configuration by the time the first character is received off of that port. By putting a delay (approximately 10-100 ms) after the VISA Configure Serial Port VI, you allow the serial port enough time to configure itself. Then, by using a VISA Flush I/O Buffer VI, you can clear any invalid data in the buffer. Reading after this sequence should work correctly. Your block diagram should appear as shown below:
B. You may be closing the VISA Resource before the Read/Write task is complete.C. Your serial port and device may be configured to use different settings. To solve this issue, open NI Measurement & Automation Explorer (NI MAX) and select your serial port under Devices and Interfaces. Verify that the VISA Resource Name, Baud rate, Data bits, Parity, and Stop bits all match the settings of your device under the port settings tab. The easiest way to check the configuration is by tracing the received signal with an oscilloscope.
Note: You can change these settings programmatically during run-time as seen in the example above, or in NI-MAX as in the example below.
D. Your cabling may be loose. Check to make sure your cables are securely plugged in.
E. You may have a bad serial cable or the wrong type of serial cable. Try another serial cable and check your device manual to determine if a null modem or straight through cable is required. Refer to the article: Should I Use Null Modem or Straight Through Serial Cables?
F. You may be experiencing noise on your serial line. Move the serial cable way from power cables, monitors, or other potential noise sources.
G. A driver installation may be corrupt. This is unlikely, but to use serial devices you need to have LabVIEW, NI-Serial, and NI-VISA on your computer. You may need to repair these installations if the error continues and you have tried all of the steps above. Refer to Fix Corrupt or Non-Working NI Software with Force Reinstall
Refer to example "Simple Serial" for an example of using the VISA Configure Serial Port VI. The example is accessible in Hardware Input and Output->Serial in the Example Finder (Finding Examples for LabVIEW - NI Example Finder).
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.