Error-Demo; Purpose; Comments - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

!
290
300
SUB Service,srq
PRINT II,,_,,,,_,,,_,,,-,,,-,,,,,,-,,-,,,-------------------------
310
PRINT "SRQ from HP8112A --> Main Program interrupted."
320
330
PRINT
Print,spoll ! read the Status Byte and print the results
340
350
PRINT
360
PRINT "End of the interrupt routine."
370
380
ENABLE
390
400
!
410
! The subroutine Print,spoll conducts a SPOLL to read the Status Byte.
420
430
! Errors as indicated by the set bits are printed.
440
450
PRINT "Value of the Status Byte (read with SPOLL): ";A
460
PRINT
470
PRINT "Service requested because of:"
480
490
500
510
520
530
540

ERROR-DEMO

Purpose

and their function

Comments

Note
! Enable interrupts again.
IF BIT(A,S) THEN PRINT 'I- Input Error"
IF BIT(A,4) THEN PRINT I'- Duty Cycle Error"
IF BIT(A,3) THEN PRINT 'I- Slope Error"
IF BIT(A,2) THEN PRINT 'I- Syntax Error"
IF BIT(A,I) THEN PRINT 'I- Timing Error"
IF BIT(A,O) THEN PRINT I'- Limit Error"
This program demonstrates how to determine which error bit(s) are
set in the HP8112 Status Byte. Also it is shown how to get a more
detailed description of an error with the interrogate error command
750
760
After an interrogate error command IERR the HP8112A returns a
more detailed description of errors. The different error descriptions
are separated by commas. If no error is active then the string "NO
ERROR" is returned.
The WAIT 2 statements in the program are only used to emphasize
the functions of the program.
OUTPUT 712;"IERR" Interrogate error
ENTER 712;A$
Read the response and store it
Programming Examples 7-13

Advertisement

Table of Contents
loading

Table of Contents