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.
- Download the latest NI-VISA driver from the NI-VISA download page.
- 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."
- Go into System Preferences->Security & Privacy->General Tab.
- Click Open Anyway.
- Double-click "NI-VISA_Full_21.0.0.pkg" again and install NI-VISA.
- 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.
- 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.
- Shut your computer down.
- Boot into recovery mode by pressing Cmd-R while restarting the computer.
- Once in recovery mode, choose Utilities->Terminal to open a Terminal window.
- In Terminal, execute this command: spctl kext-consent add SKTKK2QZ74
- 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."
- Click the Open Security Preferences button in the dialog to go to System Preferences.
- 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"
- 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.
- Click the Allow button.
- Restart the machine.
Now Igor's VISA XOP should work. Here is a good way to test it:
- 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.
- Restart Igor.
- Execute: DisplayHelpTopic "viFindRsrc" to display Igor's help for the viFindRsrc function.
- Scroll down until you see the Example function.
- Copy the entire Example function to the clipboard and paste it into the Procedure window.
- 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.