Error -1073807298 When Using a Third-Party USB-Serial Adapter

Updated Oct 26, 2018

Reported In

Hardware

  • Adapters

Software

  • LabVIEW

Driver

  • NI-VISA

Issue Details

I am using a third-party USB-Serial adapter in my application. When I call VISA Configure Serial Port.vi, I receive Error -1073807298: Could not perform operation because of I/O error. How can I resolve this issue?

 

Solution

This issue can be caused because some third party devices do not implement all serial settings on their USB-Serial adapters. To avoid the problem, do not use the VISA Configure Serial Port VI in your program. Instead use a VISA property node to set only the supported properties.

To determine which properties are unsupported by your USB-Serial adapter, use a VISA property node, and set the properties one at a time to see which properties cause the I/O error to be thrown.

The VISA Configure Serial Port VI sets the properties displayed in the image below (where grey inputs are optional).




To instead set these properties with a property node, place a VISA Property Node on your block diagram. Select Property on the node and navigate to one of the following sub-menus:
  • Serial Settings to set baud rate, data bits, parity, stop bits, or flow control
  • Message-Based Settings to set termination character enable or termination character
  • General Settings to set timeout
From there, select the property you would like to set. Then select the property node, right-click and select Change All to Read (if it's not already selected). Now you can input a constant or control to that property.

In general, if the unsupported property is needed by your application you should contact the manufacturer of the device. National Instruments USB-Serial devices do not have this limitation.

Unsupported Timeout
If you find that the unsupported property is the timeout. A potential workaround is to modify visaconf.ini by adding the token:

WriteTimeoutGranularity = 0

under section [ASRL-RSRC-ALIAS], as shown in this image:

Visaconf.ini can be found at C:\ProgramData\National Instruments\NIvisa.

Additional Information

The  ProgramData folder is hidden by default. To make it visible, open Windows Explorer and navigate to Tools»Folder Options. On the View tab, under Advanced Settings, enable Show hidden files, folders, or drives.

If you are using an NI device and getting this error or continue to see this error after following the steps in this article, see this knowledge base article for more troubleshooting steps.

WAS THIS ARTICLE HELPFUL?

Not Helpful