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 -1073807246: The Resource Is Valid, but VISA Cannot Currently Access It

Updated Dec 11, 2023

Reported In

Hardware

  • CompactRIO Controller
  • Serial Interface Device
  • PXI Serial Interface Module
  • C Series Serial Interface Module
  • CompactDAQ Controller
  • PXI Controller
  • USB Cable

Software

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

Driver

  • NI-VISA

Operating System

  • Windows

Issue Details

I am trying to communicate with a third-party instrument and I am observing the following error when I try to open a VISA session to it:

Error -1073807246 ocurred at VISA Open in...

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

 

Picture1.png

 

I can observe the same error if I try to access the interface using the VISA Test Panel in the NI Measurement & Automation Explorer (MAX), as shown in the image below:

 

Test panel.jpg


I have also noticed that the interface will show up as unknown and with a yellow question mark icon in the VISA Interactive Control tool.
 

Interactive Control.jpg

Solution

This error indicates that control of the VISA resource (e.g., the serial port, GPIB port, Ethernet port, etc.) could not be taken. It can occur in the LabVIEW Development Environment, a built executable, on a remote target, or in NI MAX. This article will provide troubleshooting guidance for each environment.

 

General Troubleshooting

  • Another program may have control over the VISA resource. Only one program can use the resource at a time. Close other programs that may be using the resource, such as NI MAX VISA Test Panels, PuTTY, or HyperTerminal. 
  • Be sure to close your NI-VISA session in your application. After running an NI-VISA application, LabVIEW does not release the VISA resource by default. 
    • Use VISA Close to close your device session at the end of your program.
    • You can configure your LabVIEW environment to automatically close VISA sessions by navigating to Tools >> Options >> Environment and checking Automatically close VISA sessions.
    • Quitting LabVIEW entirely will also close all VISA sessions.
  • If the VISA resource is disconnected, close the VISA session and then run your application again.
  • Check the compatibility of your operating system and NI-VISA driver. This can be found in the readme for your version of NI-VISA. If your version of NI-VISA is not compatible with your operating system, this may be causing the error and you need to upgrade your driver.  
  • This error can be caused by driver installation issues or corruption. Try Force Reinstalling NI-VISA .
  • Make sure your Windows operating system is up to date by running System Updates.

 

Serial Troubleshooting

  • If working with a serial device, try restarting your computer. This will force the operating system to release the serial resource.
  • Try modifying the COM Port Number through Windows Device Manager. To do this, open Windows Device Manager >> Ports (COM & LPT) >> Right-Click over the COM device >> Properties >> Port Settings >> Advanced >> COM Port Number:
 Picture2.png
  • Note: Modifying the COM Port Number may cause unexpected behavior in other applications which use the same resource.

 

Executables

  • If you are running a LabVIEW executable, and the LabVIEW Development Environment is open at the same time, the development environment may already have control of the resource. You will need to quit out of the development environment, or close your NI-VISA sessions, before running the executable. 
    • If this is the case, you may still be able to run another VI using the resource from LabVIEW, but not an executable. 
  • There may be a configuration mismatch between the LabVIEW Development Environment and the executable.
 
  1. Copy the LabVIEW.ini file (located in Program Files\National Instruments\LabVIEW 20[XX]\LabVIEW.ini) to the folder of the executable. 
  2. Rename it to have the same name as the executable (name.ini).
  3. Edit the first line from [LabVIEW] to [name].

 

Remote Targets (CompactRIO or PXI(e) Devices)

  • Check that there are no processes deployed on the target that use the serial port you are trying to access. For example, you can monitor live processes in NI Distributed System Manager such as IO Servers that use Modbus Serial. 
  • Make sure Enable Console Out is not checked in the MAX System Settings.  If this is enabled, VISA will be unable to control the serial port.
    • Some devices, such as some cRIOs, have a physical DIP switch for enabling or disabling the Console Out option. Refer to your device manual if you do not see a Console Out setting in NI MAX.