• command spelling
• missing the space between the command and parameter
• parameter out of range
• setting conflict caused by coupled commands not sent as a group (see “Step 7: Check that Coupled
Commands are Sent as a Group”)
Step 5: Check the Program is Trying to Enter the Same Amount
An error is caused if the program is set to receive different amount of data than the instrument is attempting
to output. Do the following:
• Check the parameters in Step 4 and make sure the number of data items that you programmed to
receive
• Determine if the arrays in the program are dimensioned correctly (e.g., arrays start with 0 or 1)
• Be sure you know that multiple results are returned as a comma separated list
The following IBASIC is a typical example that receives multiple readings:
DIM A(1:10) ! Dimension array for 10 readings
OUTPUT 80903;"SAMP:COUNT 10;:READ?" ! Take 10 readings using the Agilent 1326 Multimeter
ENTER 80903;A(*) ! Enter all 10 readings
Step 6: Check the Instrument’s Arm/Trigger Subsystem
All SCPI instruments follow an Arm/Trigger model that is described in the SCPI document. This model has
both required and optional levels, as follows:
Model Level Required/Optional Comment
IDLE
INITiated
LAYER < x>
LAYER < 2>
LAYer1
TRIGger
Sequence Operation
Required
Required
Optional
Optional
Optional
Optional
Required
This is the slow est occurring enabling event
This is the fastest occurring enabling event
This is the final action
The Arm/Trigger subsystem starts with the IDLE state which occurs after a power-on, :ABORt, *RST, or a
previous Arm/Trigger cycle has completed. When in the IDLE state, each of the lower levels is configured
for their parameters. Some examples are:
SOURCE - The source of the enabling signal, i.e., BUS, EXTernal
SLOPe - Selects if an event occurs on POSitive or NEGative edges
COUNt - Specifies the number of times the ARMING will be true
ECOunt - Specifies the number of times the ARMING signal occurs before one true condition, etc.
After configuring all the layers, send the INITiate command to move into the INITIATED state. This then
enables all lower layers to start their activity. Since each instrument uses different layers, consult the manual
before programming. Look for a Trigger diagram and then look at the commands it references. Some
examples using IBASIC are as follows:
Debugging VXI SCPI Programs C-5