Agilent Technologies 4294A Service Manual Page 134

  • Download
  • Add to my manuals
  • Print
  • Page
    / 518
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 133
134 Chapter 10
Handling Errors
Sample program for error handling
Sample program for error handling
Example 10-1 is a sample program for detecting an error via SRQ. This program is saved
in the file “error.bas” on the sample program disk.
This program performs necessary settings for SRQ, intentionally sends a command that the
4294A does not support to cause an error, then handles the error occurred. In the error
handling, the error is identified, its error number and message are displayed followed by a
message showing that the program is aborted.
Lines 30 to 90 Identifies the external controller and Instrument BASIC and sets the
GPIB address and the select code.
Lines 110 to 120 Sets bit 2, 3, 4 and 5 of the standard event status register to be enabled
and sets bit 5 of the service request enable register to 1.
Lines 130 to 150 Clears the status byte register, standard event status register, and error
queue.
Lines 170 to 180 Defines the destination for branching by SRQ interruption and enables
the SRQ interruption.
Lines 190 to 260 Sets a measurement parameter, a sweep start value, and a sweep stop
value. An error occurs here because an unsupported command is used
to set the start value.
Lines 290 to 300 Performs error handling. The number and message accompanied with
the error is read out.
Lines 310 to 330 Displays a message showing an error has occurred, the error number,
error message, and an another message telling that the program is
aborted.
Line 350 Displays a message for normal termination of the program. Note that
this will not be displayed unless the program is modified to employ an
appropriate command for setting the start value.
Page view 133
1 2 ... 129 130 131 132 133 134 135 136 137 138 139 ... 517 518

Comments to this Manuals

No comments