NI VISA Driver for Mac OS 12 (Monterey)

This post is of interest if you run the VISA XOP on Macintosh.

VISA (Virtual Instrument Software Architecture) is a system that provides instrument control via serial ports, GPIB, Ethernet, USBTMC and other media.

Igor's VISA XOP relies on a VISA library. Most people use the National Instruments library named NI-VISA.

As of this writing, National Instruments currently released NI-VISA driver is 21.0.0. This version is expected to work on Intel Macintosh, not on M1 Macintoshes.

The NI-VISA driver worked without issue on Mac OS versions through 11.3. Starting with Mac OS 11.4, we were unable to get it to work. Thanks to a tip on the Igor Mailing list, we are now able to get it to work on Mac OS 12.5. The steps explained below will probably work at least on Mac OS 11.4 through 12.x.

Here are the steps that worked on Mac OS 12.5 on a 2019 Intel MacBook Pro running Igor Pro 9.01.

  1. Download the latest NI-VISA driver from the NI-VISA download page.
  2. Double-click the downloaded "NI-VISA_Full_21.0.0.dmg" file and then double-click "NI-VISA_Full_21.0.0.pkg". The OS says "NI-VISA_Full_21.0.0.pkg can’t be opened because Apple cannot check it for malicious software."
  3. Go into System Preferences->Security & Privacy->General Tab.
  4. Click Open Anyway.
  5. Double-click "NI-VISA_Full_21.0.0.pkg" again and install NI-VISA.
  6. Go back into System Preferences->Security & Privacy->General Tab. If you see something about allowing a kernel extension from National Instruments, unlock the settings using the lock icon in the lower left corner of the pane and click the Allow button.
  7. Restart your machine.

If you did not see something about allowing kernel extension from National Instruments in step 6, you need to perform additional steps to get Mac OS to load the National Instruments kernel extensions. These steps come from this NI web page.

  1. Shut your computer down.
  2. Boot into recovery mode by pressing Cmd-R while restarting the computer.
  3. Once in recovery mode, choose Utilities->Terminal to open a Terminal window.
  4. In Terminal, execute this command: spctl kext-consent add SKTKK2QZ74
  5. Choose Restart from the Apple menu to reboot into your normal OS. During restart, you should see a dialog that says "To finish the update, you must approve it in the Security & Privacy System Preferences."
  6. Click the Open Security Preferences button in the dialog to go to System Preferences.
  7. In System Preferences, navigate to the Security & Privacy preferences, General tab. You should see this message: "System software from developer National Instruments has been updated"
  8. You should see an Allow button but it is disabled. To enable the button, click the lock icon in the lower left corner of the pane and authenticate.
  9. Click the Allow button.
  10. Restart the machine.

Now Igor's VISA XOP should work. Here is a good way to test it:

  1. Activate the VISA64.xop file in "Igor Pro 9 Folder/More Extensions (64-bit)/Data Acquisition" by making a shortcut for it and putting the shortcut in the "Igor Pro 9 User Files/Igor Extensions (64-bit)" folder.
  2. Restart Igor.
  3. Execute: DisplayHelpTopic "viFindRsrc" to display Igor's help for the viFindRsrc function.
  4. Scroll down until you see the Example function.
  5. Copy the entire Example function to the clipboard and paste it into the Procedure window.
  6. Execute this from the command line: Example()

A list of serial ports or an error message if you have no serial ports should be printed in the history area. Either of these indicates that the NI-VISA driver is working. If the driver is not working, Igor should crash.