Use the following video tutorials or the document below to assist you in completing this task:
The Measurement and Automation (MAX) utility comes with the NI-488 driver for your GPIB controller. MAX makes GPIB instrument detection and control easy by providing you tools to search for connecting instruments, and send and receive communication with your device.
Open MAX by going to Start»Programs»National Instruments»Measurement & Automation. To confirm that your GPIB device is connected properly, expand the "Devices and Interfaces" subdirectory below "My System."
Figure 1. MAX Main Menu
Then, select your GPIB controller and click on "Scan for Instruments" (figure 2). In this tutorial we are using an NI USB-GPIB-HS controller. If you are using a PCI, serial, or Ethernet controller/converter, the name may be slightly different.
Figure 2. Scanning for Instruments in MAX
If your GPIB device is SCPI compliant, the name and address will appear in main window once the instrument name in the configuration tree has been clicked.
Figure 3. Attributes Tab for an Instrument
If your device did not appear, please refer to GPIB Installation/Configuration Troubleshooter. Also refer to KnowledgeBase 1UO68A5P: "Scan for Instruments" Fails in Measurement and Automation Explorer.
MAX takes care of creating the necessary resources for VISA communication with your GPIB instrument. By selecting the instrument in from the subdirectory on the left, and then selecting its "VISA Properties" tab (circled in red at the bottom of Figure 4), you can change the VISA Resource Name of the device and communicate with it by clicking on "Communicate with Instrument" (SCPI commands), or "Open VISA Test Panel" (non-SCPI commands).
Figure 4. VISA Properties Tab for an Instrument
The VISA Interactive Control (VISAIC), is a standard software utility included with National Instruments GPIB controller products. Using your computer, you can use this powerful development and debugging tool to interactively communicate (read, write, serial poll, etc.) with your GPIB instruments. With the VISAIC utility, you can speed up application development by learning how to automate measurements with your instruments, uncover GPIB problems, and avoid headaches by identifying malfunctioning instruments. For Windows platforms, the VISAIC utility comes complete with on-line help that describes the applicable NI-488 functions and NI-488.2 routines, syntax, error codes, and status variables that provide you with the debugging information you need to solve problems.
For a detailed discussion on how to use the VISAIC utility and the functions used in the examples, refer VISA help file and NI-488.2 help file, respectively, that came with your GPIB controller. The following sections assume a basic knowledge of the VISAIC utility and GPIB.
To access the VISAIC, in MAX go to Tools»NI-VISA»VISA Interactive Control. You can also expand the Software tab within MAX, expand the NI-VISA sub-directory, right-click NIvisaic.exe, and left-click the Launch button.
Figure 5. Launch NIVISAIC
When VISAIC initially runs, it automatically finds all of the available resources in the system and lists the instrument descriptors for each resource under the appropriate resource type. The figure below shows the VISAIC opening window.
Figure 6. Visa Interactive Control
Instruments must be powered on and connected to the GPIB controller in order to be recognized. If you have two or more instruments on the bus, you can disconnect all instruments except one to determine its address. By isolating each instrument on the bus and repeatedly Refreshing (View » Refresh), you can quickly determine the address of each instrument. You could also use "Resource to Find" field and this will query each instrument for an identification (ID) string. ID querying is discussed in a section to follow.
Once you have determined the GPIB address of your instruments, it is easy to establish communications to verify that you can send and receive data to and from the instrument. Because most instruments are 488.2 compliant, you can query the instrument for its identification by by sending it the "*IDN?" command. Instruments will typically respond with the manufacturer's name, model name, and various alphanumeric characters that the manufacturer uses to track firmware revisions. To communicate with our instrument at address 4, we will follow these instructions:
First, double-click the instrument in the VISAIC that you would like to communicate with, in our case GPIB0 ::4::INSTR.
This will open up a VISA Test Panel for our instrument. This Test Panel will allow us to set properties for our instrument communication as well as read and write to the instrument.
Figure 7. VISA Test Panel
From the Basic I/O tab, we can select the *IDN?\n command which is the 488.2 instrument identification command "*IDN?" followed by the termination character "\n". Next, we can press the "Write" button to send this command to the instrument. Finally, we should press the "Read" button to read back the response from the instrument. Our instrument should return an identification string that will appear in the window. We can also perform both a write and a read automatically by pressing the "Query" button.
Now from the viRead tab, select a count of 100, the length of our expected response, then click Execute. Our instrument should return an identification string.
You have just confirmed communication with your instrument. Repeat this process to confirm communication with all of your connected instruments.
Figure 8. VISAIC viREAD
Many times systems are powered down and cables are disconnected from instruments for maintenance or to change the configuration of the system. Unfortunately, engineers sometimes forget to reconnect all the cables and power up all the instruments. Alternatively, system power may be disrupted for a variety of reasons or the actual instrument may begin to malfunction. VISAIC is also convenient for verifying that your instruments are still "alive" on the bus. Simply use the Refresh (View » Refresh) to check if a particular instrument is listening at its assigned GPIB address. If it is not, then you know to check cables, power, and verify that the instrument is working properly.
If there was a problem you would get no longer see your device, notifying you to check for loose or disconnected cables, power disruption, or a malfunctioning instrument.
The basic functions and concepts described above may seem simplistic; however they can be invaluable in troubleshooting and getting your GPIB system up and running. These productivity tools help you focus on developing your test applications to avoid frustration in trying to track down obscure problems or establishing communications with your instruments.
Once this is done, you need a fast way of going from interactive mode to programming mode so you can directly begin writing your tests without a tedious transition process. The best way to achieve this is by using Instrument Drivers.