
96
Chapter 8
Avoiding Mistakes Related to Work and Daily Checks
Avoiding Mistakes Related To Work
Figure 8-1
SRQ generation sequence (when an error occurs)
Sample program
Example 8-1 shows a sample program to detect the occurrence of an error using SRQ. This
program is stored on the sample program disk under the filename “srq_err.bas”.
This program sets up SRQ, intentionally sends a nonexistent command for the 4288A to
generate an error, and performs error handling. In the error handling, the program checks
which error has occurred, displays the error number and error message, and displays the
“PROGRAM INTERRUPT” message.
Line 40
Sets the GPIB address.
Lines 60 to 70
Enables bit 2, bit 3, bit 4, and bit 5 of the standard event status register
and sets bit 5 of the service request enable register to 1.
Lines 80 to 100
Clears the status byte register, standard event status register, and error
queue.
Lines 120 to 130 Sets the branch destination of the SRQ interrupt and enables SRQ
interrupt.
Lines 140 to 190 Selects the primary parameter and secondary parameter. However,
because the command for the secondary parameter is wrong, an error
occurs.
Lines 220 to 230 Processing when an error occurs. Reads out the error number and error
message of the error that has occurred.
Lines 240 to 260 Displays the “Error occurred!!” message, error number, error message,
and “PROGRAM INTERRUPT!!” message.
Line 280
Displays the “PROGRAM DONE” Message. Notice that this message
is not displayed unless you correct and execute the secondary
parameter selection command.
Summary of Contents for 4288A
Page 18: ...16 Chapter1 Making Effective Use of This Manual How To Use This Manual ...
Page 212: ...210 AppendixA Manual Changes Manual Changes ...
Page 248: ...246 AppendixB Information for Replacing 4278A with 4288A Comparison of Interfaces ...
Page 258: ...256 AppendixC Status Reporting System Using the Status Reporting System ...
Page 288: ...286 Index Index ...