After Installing 3rd Party VISA Software NI VISA No Longer Works

Updated Mar 18, 2019

Reported In

Software

  • Measurement & Automation Explorer (MAX)

Driver

  • NI-VISA

Operating System

  • Windows

Issue Details

I previously installed NI-VISA on my system, and I was able to identify and communicate successfully with my instruments in 32-bit NI MAX, LabVIEW, or other development environment. I then installed another vendor's version of VISA, such as TekVISA or Keysight VISA. Now I can no longer identify or communicate with my COM ports or VISA instruments. Why is this occurring, and how can I resolve it?  

An error like the following may appear in NI-MAX:

MAX is unable to create a visa resource on this computer.

Error -1073807202 may appear in LabVIEW:

Solution

Only one 32-bit VISA implementation can be configured as primary on a system at a given time. This primary VISA acts as the core VISA library of the system.

In the case described above, NI-VISA is initially installed as primary and is then changed to secondary when the second VISA implementation is installed.

Reinstalling the appropriate NI-VISA software can reset the proper implementation scenario.

If the NI-VISA reinstall is not successful then you can reset NI-VISA as primary by following the steps below:

Verifying Which VISA Implementation Is Primary
First, verify that NI-VISA is not currently installed as primary on your system by following these steps:
  1. Navigate to the appropriate directory below based on the bitness of your OS and locate visa32.dll:
    • 32-bit systems: C:\WINDOWS\system32
    • 64-bit systems: C:\WINDOWS\sysWOW64
  2. Right-click on visa32.dll and select Properties.
  3. Find the copyright information:
  • On Windows Vista/7/8/10: Navigate to the Details tab:
  • On Windows XP: Navigate to the Version tab:

If the copyright information states National Instruments, then NI-VISA is set to be the primary VISA on your system. If another company is stated, then follow the steps below to make NI-VISA primary.

Setting NI-VISA as Primary
  1. Navigate to the appropriate directory below based on the bitness of your OS and locate visa32.dll:
    • 32-bit systems: C:\WINDOWS\system32
    • 64-bit systems: C:\WINDOWS\sysWOW64
  2. Rename visa32.dll to an alternate name, such as visa32.dll.bak.
  3. Repair the NI-VISA driver, by uninstalling and re-installing it according to our guide Uninstalling National Instruments Software or Drivers Using NI Package Manager
  4. Reboot your computer.
If Resetting NI-VISA as Primary Doesn't Work:
  1. Uninstall all NI software following the steps listed in step 3 under Setting NI-VISA as Primary.
  2. Uninstall the third party software from your computer.
  3. Delete the visa32.dll files
  4. Reinstall the NI software
  5. Reinstall the third party VISA software

Additional Information

The reason that you must rename visa32.dll in step 2 is that repairing the NI-VISA installation will not automatically overwrite this file. The file will only be overwritten in the event that a newer version of visa32.dll is attempting to be installed, which is not the case when repairing previously installed software.

Note: Some 32-bit VISA implementations support being installed as secondary, which allows them to be installed side-by-side with 32-bit NI-VISA. For more information, see the Related Links below or contact the vendor.

Note: The primary and secondary VISA designations apply only to 32-bit implementations of VISA. Multiple 64-bit implementations of VISA can be installed to a system without running into this problem.

WAS THIS ARTICLE HELPFUL?

Not Helpful