
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.
Содержание 4294A
Страница 4: ...4 ...
Страница 18: ...18 Contents ...
Страница 24: ...24 Chapter1 To make effective use of this manual Other manuals attached to this unit ...
Страница 94: ...94 Chapter6 Reading Writing Measurement Data Reading Writing Data ...
Страница 110: ...110 Chapter7 Processing Measurement Results Analyzing Measurement Results ...
Страница 130: ...130 Chapter9 Communication with External Equipment Using the I O Ports Sample Program to Use the I O Port ...
Страница 136: ...136 Chapter10 Handling Errors Sample program for error handling ...
Страница 246: ...246 13 Application Sample Programs File Transfer Function ...
Страница 254: ...254 Chapter15 Setting the Display LCD Sample program for setting the LCD screen ...
Страница 507: ...Index Index 507 Index ...
Страница 508: ...508 Index Index ...
Страница 509: ...Index Index 509 Index ...
Страница 510: ...510 Index Index ...
Страница 511: ...Index Index 511 Index ...
Страница 512: ...512 Index Index ...
Страница 513: ...Index Index 513 Index ...
Страница 514: ...514 Index Index ...
Страница 515: ...Index Index 515 Index ...
Страница 516: ...516 Index Index ...
Страница 517: ...Index Index 517 Index ...
Страница 518: ...518 Index Index ...