Error_Demo - HP 8112A Operating, Programming And Servicing Manual

50 mhz programmable pulse generator
Table of Contents

Advertisement

290
300
SUB Service_srq
PRINT " - - - - - - - - - - - - - - - - - -- - - - - - -- - - - - - - - - - - - - - - - - - - - - "
3 1 0
PRINT 11 SRQ from HP8 1 12A - - > Main Program interrupted . "
320
PRINT
330
340
Print _ spoll
350
PRINT
360
PRINT " End of the interrupt rout ine . "
PRINT " - - - - - - - - - -- - - - - -,- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
370
380
ENABLE
SUBEND
390
400
4 1 0
SUB Print _ spoll
420
430
A=SPOLL (7 12)
440
450
PRINT "Value of the Status Byt e (read with SPOLL ) :
PRINT
460
470
PRINT " Serv i c e requested b e c ause of : "
480
490
500
5 1 0
520
530
540
SUBEND

ERROR_DEMO

Purpose
Important program lines
and their function
Comments
Note
!
read the Status Byt e and print the results
!
Enab l e interrupt s again .
The subrout ine Print _ spoll conduct s a SPOLL to read the Status Byt e .
Errors as indicat e d by the s et b i t s are print ed .
IF B IT (A , 5 ) THEN PRINT 11 - Input Error "
IF B IT ( A , 4) THEN PRINT 1 1 - Duty Cycle Error"
IF B IT (A , 3 ) THEN PRINT 1 1 - Slope Error "
I F B IT ( A , 2 ) THEN PRINT 11 - Syntax Error"
IF BIT ( A , 1 ) THEN PRINT 1 1 - Timing Error"
IF B IT ( A , O ) THEN PRINT 11 - L imit Error "
This program demonstrates how to determine which error bit
set in the HP81 12 Status Byte. Also it is shown how to get a more
detailed description of an error with the interrogate error command
IERR. Both functions are performed by the subroutine PrinLerrors.
750
760
After an interrogate error command IERR the HP81 12A 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 7 1 2 ; 1 1 IERR 1 1
ENTER 7 12 ; A$
" ; A
Interrogate error
Read the response and store it
Programming Examples 7-13
(
)
s
are

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents