This LabVIEW VI (version 2018) provides a simple platform to begin creating LabVIEW programs.
You can download the VI here: VISA_IDN.ZIP
In this example, the user can:
- Select the connected instruments from the VISA Resource List drop down menu:
NOTE: USB devices will automatically appear. For LAN connections, you will need to add the device. This is commonly done using NI Measurement and Automation Explorer (NI-MAX)
- Request the identification string once-per-press of the RUN button.
This sends the “*IDN?” identification query string to the instrument. The instrument then responds to the query with its identification string information. The identification string data will appear in the text box.
This code also uses the event structure connected to the value change of the RUN button to run once-and-only-once per keypress. This is a useful method of controlling code execution.
- Stop and exit upon pressing the STOP button
- Connect instruments using a USB or LAN connection (see users manual for specific instrument details)
- Power on instrument
- Open LabVIEW and select the IDN.VI. This will open the VI front panel:
4. Select the instrument of interest from the VISA Resource drop down menu:
5. Press RUN on the LabVIEW VI menu strip to run the program:
6. Now, the “graph paper” background goes clear, indicating that the code is running. Now, you can press RUN in the VI Front Panel to execute the code:
The identification string should appear in the textbox:
7. Press STOP on the VI Front Panel to exit the code