Error -1073807246 When Opening Duplicate VISA Session on NI Linux RT

Updated Mar 27, 2023

Reported In

Driver

  • NI-VISA

Operating System

  • NI Linux Real-Time

Issue Details

I am using the serial port of my device to continuously communicate with another device and I want to create a GUI on my host PC to see the data acquired over that port, but when using VISA server to open a duplicate session for that resource remotely on my LinuxRT device, I get the following error message:
 

Error -1073807246 occurred at an unidentified location

Possible reason(s):

VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.

 

This error is shown in this dialog box:

Solution

What you need to do is have the RT VI use the VISA Server in the local process instead of opening the serial port directly. The Remote Passport can be used to achieve this. All you need to do is change the RT VI's VISA resource. 
For example: ASRL1::INSTR would become visa://localhost/ASRL1::INSTR

Additional Information

On Linux, VISA sets the serial port as an exclusive process. As a result, any other process trying to access that port as exclusive fails. This is why you are able to interact with the port in multiple spots within the RT VI (same process) but VISA Server, which runs as a separate process, is shut out. The Windows implementation of VISA operates this way as well. On some legacy devices however, both services run as part of a single process and therefore are both allowed to interact with the serial port simultaneously.

If you receive Error -1073807192 when using the Remote Passport resource on the RT VI, follow the instructions in this article: Error -1073807192 When Accessing the Serial Port Using NI-VISA on a LinuxRT Target