How To Capture GPIB Command Sequences

advertisement
How to Capture GPIB Command Sequences for PNA-CXL Instrument
Migration
Capture commands with the built in command logger:
You can run the CXL application to emulate the behavior of legacy equipment. Included with the CXL application is a
built-in command logger. The command logger provides a convenient way to monitor live bus activity. Command
logging can be useful for trouble-shooting problems.
For small problems, the built-in command logger can be helpful. However, there are limitations to how much
information can be captured with the built-in command logger. The buffer size is limited to 27 commands and timing
information is not captured. When it is necessary to capture additional timing information in a larger buffer, other tools
are available.
Capture commands on PCs installed with the NI or Agilent GPIB cards
If you are using a PC to control your instruments, it is most likely that you are using either a National Instruments GPIB
card or an Agilent Technologies (or older Hewlett Packard) GPIB card. If you are not sure which you are using, go to the
“Start/All Programs” menu and look for “National Instruments”. If you see an entry there, you are probably using the NI
card. To make sure you can click “Start/All Programs/National Instruments/NI-488.2/Troubleshooting Utility. The
following dialog should popup and you can check the software and hardware card(s) that are present.
If there is no “National Instruments” menu folder, then look for a folder named “Start/All Programs/Agilent IO Libraries
Suite”. If you see this entry you probably have an Agilent GPIB card. To make sure, click ”Start/All Programs/Agilent IO
Libraries Suite/Agilent Connection Expert”. A dialog similar to the one below should pop up. You can check to see if
there are PIB interfaces connected and properly configured (green check).
Follow the directions below for the interface you are using. If you are using some other interface or a UNIX, LINIX
computer contact us for other options.
Running NI Spy to Capture SCPI Commands
1. Before running the user’s test software program, you will need to start the NI Spy program. From the “start”
menu, select NI Spy
2. In the Spy window, select Spy/Options … Under the General tab, set the call history large enough to capture all
the commands you are sending (10,000 is usually OK most of the time unless the test runs for hours). Set the
Buffer Limit per Parameter to “Large Buffer” and the Print/Export Settings to Extended.
3. U
n
d
e
r
t
h
e
E
r
r
o
r
A
c
t
i
on Tab select “Continue capturing and ignore error”. Click OK to save these settings.
4. Click the “Run” button (blue arrow) to start logging SCPI commands.
5. Run the test software. NI Spy will slightly slow down the process , but will capture the Commands sent to the
instruments :
6. When finished capturing the SCPI commands, click the red stop button
7. Click the menu: “ File/Save As … “ to save the file. Optionally you can “File/Export” the file.
8. Email the saved file. Agilent has a program that can read the file, list all the unique SCPI commands, and allow us
to replay your command sequence with lots of debugging aids.
Running Agilent IO Monitor to Capture SCPI Commands
1. Before running the user’s test software program, you will need to start the IO Monitor program. From the
“start” menu, select “Agilent IO Libraries Suite/Utilities/IO Monitor”
2. In the IO Monitor window, select “Monitor/Options … “Under the Monitor tab, set the Maximum size of
parameter buffer per I/O function call to 64K. Make sure SICL and Agilent Visa are selected. On The Display tab
set the Maximum number of events to display large enough to capture all the commands you are sending
(10,000 is usually OK most of the time unless the test runs for hours). Select “Stop collecting events” and Check
the “Confirm Clear Display Action”.
If you are using a newer version of Agilent IO Libraries, the previous tabbed dialog has changed (see below).
3. Click the “Monitor I/O” button to start logging the SCPI commands. Click
newer version.
4. When finished capturing the SCPI commands, click the Stop Monitoring button or
the newer version.
for the
for
5. Click the menu: “ File/Save As … “ to save the file. Agilent has a program that can read the file and list all the
unique SCPI commands.
For the newer interface click “File/Save Messages As …” to save the captured file.
6. Email the saved file. Agilent has a program that can read the file, list all the unique SCPI commands, and allow us
to replay your command sequence with lots of debugging aids.
Download