Install NI Software and Drivers
- Download the latest compatible version of LabVIEW and NI Linux Device Drivers. Refer to the Readmes for system requirements and compatibility information. The Linux Device Driver readme can be found on the download page.
- Follow the instructions in Installing NI Drivers and Software on Linux Desktop to install the driver software.
To control your instrument on a Linux machine, you will need to install the following driver repositories:
Install Instrument
Refer to the following links on how to install your instrument hardware based on instrument type: Ethernet, GPIB, 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.
- Launch the visaconf utility by entering visaconf command in the terminal window.
- If your instrument is not displayed under the Resource Editor tab, click the Add Static button to add it to your system.
- In the Add New Static Resource tab, select the instrument interface from the list. Configure the settings for the instrument and click OK. The instrument resource is now added to your system and will show up under the Resource Editor tab.
- Click File >> Save VISA Configuration.
Test Communication With VISA Interactive Control
After set up and configuration, use VISA Interactive Control (VISAIC) to verify communication with the instrument and test different instrument commands.
- Launch VISAIC by entering the NIvisaic command in the terminal window.
- In the VISAIC window, double-click on the VISA resource of your instrument created in the previous section.
- A VISA session window for the instrument VISA resource will open. In the viWrite tab, enter the *IDN?\n command into the Buffer field. Click Execute.
- In the viRead tab, click Execute. The Buffer field should read a response from the instrument.
Install Instrument Driver
After completing your configuration and verifying communication with the instrument, you can easily transition from interactive mode to programming mode by using an instrument driver. Only Plug and Play instrument drivers are supported on Linux.
- 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 Linux if it is an *.exe file. - 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.