HP 8112A Operating, Programming And Servicing Manual page 103

50 mhz programmable pulse generator
Table of Contents

Advertisement

!
1 0
N am e o f t h i s program : SPOLL_2
! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
20
30
This program demonstrat e s that the HP8 1 12A ' s
!
40
SRQ is cleared after SPOLL .
50
60
CLEAR SCREEN
70
CLEAR 7 1 2
80
A=SPOLL ( 7 1 2 )
90
100
1 10
A=SPOLL ( 7 12 )
120
PRINT " SPOLL b ef ore the syntax error = " ; A
130
PRINT
140
PRINT " XXX is output . This will cause a syntax error . "
1 50
OUTPUT 7 12 ; " XXX"
!
160
WAIT . 1
give HP8 1 12A t ime t o receive " XXX" and updat e the Status Byt e
170
180
A=SPOL L ( 7 1 2 )
190
PRINT " 1st SPOLL after syntax error = " ; A
200
WAIT . 1
2 1 0
A=SPOL L ( 7 1 2 )
220
PRINT " 2nd SPOLL after syntax error = " ; A
230
PRINT
240
WAIT 2
250
A=SPOLL ( 7 12 )
260
PRINT " SPOLL after wait ing 2 s econds = " ; A
270
PRINT
280
PRINT "End of the program SPOLL_2 . "
290
300
LOCAL 7 1 2
3 10
END
Without the synchronization with the WAIT command (line 230),
the SPOLL would be conducted whilst "XXX" is being parsed. At
this moment there is neither a syntax error or SRQ active. The
resultant SPOLL would be 1 28, indicating that the HP 8 1 12A
command buffer is not empty. (See Chapter 6
reporting.
Init ial ize Int ef ace and HP8 1 12A
clear status byt e
!
read the status byte with SPOLL
!
C ause a syntax error .
Error, fault and status
Programming Examples 7-1 1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents