Using the Program
The following shows how to use the program with your application code.
Step 1: Run Program Without Application Code
Run the program with no application code in Subprogram “Main”. This verifies that you can successfully
communicate with both the Agilent E1326 and the System instrument. If errors occur, calling Subprogram
“E1300_stat”, or pressing the softkey “SYS_STAT”, shows information about all modules in the
mainframe. The logical addresses along with the VXI information about the card will enable you to check
that correct addresses are being used.
Step 2: Begin Writing the Application Program
Begin writing your application in Subprogram “Main”. The first thing you should always do is fully reset
any instruments your application will be using. Lines 2250-2280 in Subprogram “Main” resets the Agilent
E1326.
Step 3: Writing Your Application
Now write your application and then run the program. If your application terminates successfully, you will
see the messages:
Checking for E13xx Errors at the end of the program
SYSTEM ERROR + 0," No error"
DVM ERROR + 0," No error"
Program Description
In Subprogram “Main”, lines 2300-2330 are the beginning of an application that was written with an error
in it to demonstrate the program’s error handling. The error is in line 2310, as follows:
2310 OUTPUT @Dvm;"SAMP:COUNT5;:READ?"
When running the program, the resultant output shows this error:
ERROR 168 IN 2330 I/O timeout
DVM ERROR “ Undefined header”
Next, the program automatically queried all of the Agilent E1326 command parameters and showed that:
SAMP:COUNT? = + 1
Note that the I/O timeout in line 2320 was caused by an undefined header (i.e., incorrect SCPI command) in
some command. The actual SAMP:COUNT is 1, not 5, as intended thus, the undefined header is probably
in “
SAMP:COUNT5”. Consulting the manual on this command shows that a space is necessary between the
“T” and the “5”.
C-8 Debugging VXI SCPI Programs