Appendix C
Debugging VXI SCPI Programs
Introduction
This appendix shows how to debug programs for the mainframe and installed modules using the Standard
Commands for Programmable Instruments (SCPI). SCPI provides a common language for the mainframe
and modules to simplify programming and debugging. For specific commands, refer to the mainframe and
module’s User’s manuals.
Steps To Debug Programs
Perform the following steps if your program does not produce the expected results. Steps 1 to 4 help find
most programming errors and steps 5 to 8 should find the more difficult errors that the previous steps may
not find.
1. Verify Instrument Communication
2. Reset Each Instrument at the Start of the Program
3. Query the Instruments for Errors
4. Query All Command Parameter Settings that are Set
5. Check the Program is Trying to Enter the Same Amount of Data the Instrument is Trying to
Output
6. Check the Instrument’s Arm/Trigger Subsystem
7. Check that Coupled Commands are Sent as a Group
8. Check for Command Synchronization
Note Most of the examples in the following steps use BASIC/IBASIC as the program language to
send SCPI commands.
Step 1: Verify Instrument Communication
Use this step to determine if the program can communicate with the instruments in the mainframe.
Logical and GPIB Addressing
The Agilent VXI system contains either a command module or a mainframe with a built-in command
module. The default Logical Address of the command module is normally 0 which makes the GPIB
Secondary address 0. The default Primary GPIB address is 09. If the program can communicate with the
mainframe/command module using these addresses, the program can determine other instruments in the
mainframe.
Debugging VXI SCPI Programs C-1