Instrument Control on Mac OS X

Updated Oct 20, 2023

Environment

Software

  • LabVIEW

Driver

  • NI-VISA

Operating System

  • Mac OS X

This tutorial shows you how to set up NI software to communicate with an Ethernet, GPIB, serial or USB instrument in LabVIEW on Mac OS X.

Note: LabVIEW 2023 Q3 is the final release of LabVIEW for macOS. Starting with releases in 2024, LabVIEW is available on Windows and Linux OSes.

Install NI Software and Drivers

Install the latest compatible version of LabVIEW and the NI-VISA driver for your system. Refer to the following for compatibility information.

 

Install Instrument

Refer to the following links on how to install your instrument hardware based on instrument type: EthernetGPIB, Serial, or USB.

Configure Instrument With visaconf

NI-VISA installs with a configuration utility called visaconf for Linux and Mac OS X. Use this utility to add and configure instruments in your system.

  1. Launch the visaconf utility by navigating to the following directory: Applications\National Instruments\NI-VISA\NI-VISA Configuration.
  2. If your instrument is not displayed under the Resource Editor tab, click the Add Static button to add it to your system.
 
  1. The Add Static Resource dialog box will appear. Select the instrument interface from the list and click OK.

 
  1. In the Resource Editor window, select the settings for your instrument and click OK.

 
The instrument resource is now added to your system and will show up under the ResourceEditor tab.

 

Install Instrument Driver

After completing your instrument configuration, you can easily transition from interactive mode to programming mode by using an instrument driver. Only Plug and Play instrument drivers are supported on Mac OS X.

  1. Refer to Using Plug and Play Instruments Drivers in LabVIEW  to find and download the instrument driver.
    Note: Before downloading the driver, make sure it is packaged as a *.vi or *.llb file. You cannot open or install the driver on Mac OS X if it is an *.exefile.
  1. After downloading the instrument driver files, install the *.llb and menu files in the LabVIEW\instr.lib folder.

You now have access to the instrument driver VIs from the Functions >> Instrument I/O >> Instrument Drivers palette in LabVIEW. You can use these VIs to communicate with your instrument.

If an instrument driver does not exist for your instrument, you can use VISA functions in LabVIEW to control your instrument. You can access the VISA VIs from the Function >> Instrument I/O >> VISA palette.

    Run an Example

    The instrument driver and NI-VISA driver will install examples and the API required to communicate with your instrument. Use these examples as programming references and an easy way to start using your instrument.

    Refer to the following resources for LabVIEW examples. If you are using the NI-VISA driver, refer to the instrument specific NI-VISA examples.