HP 8112A Operating, Programming And Servicing Manual page 106

50 mhz programmable pulse generator
Table of Contents

Advertisement

! Name of this program : ERROR_DEMO
10
20
! - - - - - - - - - - - - - - - - - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
3 0
This program demonstrates hov to determine which error bit ( s )
40
are set in the HP8 1 12A ' s Status Byte . Also it is shown hov to
50
get a more detailed description of an error with the
60
" Interrogate Error" ( !ERR) command . Both funct ions are performed
70
in the subroutine Print_errors .
80
90
CLEAR SCREEN
100
1 10
CLEAR 7 1 2
A = SPOLL ( 7 12 )
120
130
PRINT " N ov Period is 1 ms , Width is set to 10 ms . 11
140
PRINT "This causes width and slope error (Width>Period) . 1 1
150
PRI N T " - - - - - - - - - - - - ------------- - -------- -- - - - - - - ---- ------- -- "
160
170
OUTPUT 7 1 2 ; " WID 10MS " ! set width to 10 ms ( ca.uses width error)
180
190
200
WAIT . 1
210
220
230
GOSUB Print _errors
240
250
D ISP "Paus ing , press Continue to continue . "
260
PAUSE
270
CLEAR SCREEN
280
290
PRINT "Nov Width is set to 500 us . This removes the cause for the errors . "
300
PRINT
3 1 0
320
OUTPUT 7 12 ; "WID500US"
330
340
WAIT . 1
350
360
370
GOSUB Print_ errors
380
390
PRINT
PRINT "End of the program ERROR_DEM0 . 1 1
400
410
LOCAL 7 1 2
420
STOP
430
440 Print_ errors : ! prints the errors set in the Status Byt e and uses the " !ERR"
450
460
470
WAIT 2
480
490
A=SPOLL (712)
500
PRINT " Value of the Status Byt e : " ; A
7-14
Programming Examples
int ial ize interface and HP8 1 12A
clear status byt e
HP8 1 12A needs t ime to execute a command and update the
Status Byte .
" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "
HP8 1 12A needs t ime to execut e a command and update the
Status Byt e .
command to get more det ailed descript ions of the errors .
not necessary
read the status byt e

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents