Detecting Error Occurrence Using Srq (Ht Basic) - Keysight E4981A Programming Manual

Capacitance meter
Hide thumbs Also See for E4981A:
Table of Contents

Advertisement

Measurement Applications (Sample Programs)

Detecting Error Occurrence using SRQ (HT Basic)

Detecting Error Occurrence using SRQ (HT Basic)
Example 9-17
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
E4981A 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
Lines 60 to 70
Lines 80 to 100
Lines 120 to 130
Lines 140 to 190
Lines 220 to 230
Lines 240 to 260
Line 280
152
shows a sample program to detect the occurrence of an error
Sets the GPIB address.
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.
Clears the status byte register, standard event status
register, and error queue.
Sets the branch destination of the SRQ interrupt and
enables SRQ interrupt.
Selects the primary parameter and secondary parameter.
However, because the command for the secondary
parameter is wrong, an error occurs.
Processing when an error occurs. Reads out the error
number and error message of the error that has occurred.
Displays the "Error occurred!!" message, error number,
error message, and "PROGRAM INTERRUPT!!" message.
Displays the "PROGRAM DONE" Message. Notice that this
message is not displayed unless you correct and execute
the secondary parameter selection command.
Keysight E4981A 120 Hz/1 kHz/1 MHz Capacitance Meter

Advertisement

Table of Contents
loading

This manual is also suitable for:

E4981a/001E4981a/002

Table of Contents