4
Making Measurements
180 ELSE!IF BIT 2 WAS NOT SET:
190 PRINT "HI/LOW LIMIT TEST PASSED"!PRINT TEST PASSED MESSAGE
200 END IF
210 END
The following program is similar to the preceding program except that it uses the
post-process PFAIL operation on 20 readings stored in memory. The post process
PFAIL operation is a batch operation. That is, the readings do not have to be
recalled from memory in order to perform the PFAlL operation. Also notice that the
readings must be stored before enabling the post process PFAIL operation (if not,
the MEMORY ERROR will occur).
10
20
30
40
50
60
70
80
90
100 OUTPUT 722;"STB?";!QUERY SET BITS IN STATUS REGISTER
110 ENTER 722; A!ENTER QUERY RESPONSE
120 IF BINAND(A,2) THEN!IF BIT 2 IS SET:
130 PRINT "Hi/LOW LIMIT TEST FAILED"
140 OUTPUT 722;"RMATH PFAILNUM"!QUERY PFAILNUM REGISTER
150 ENTER 722; B!ENTER QUERY RESPONSE
160 PRINT "NUMBER OF READINGS THAT PASSED BEFORE FAILURE WERE";B
165!PRINT PFAILNUM RESPONSE
170 ELSE!IF BIT 2 WAS NOT SET:
180 PRINT "HI/LOW LIMIT TEST PASSED"
190 END IF
200 END
186
OUTPUT 722;"PRESET NORM"!PRESET,NRDGS 1,AUTO, DCV 10, TRIG SYN
OUTPUT 722;"MEM FIFO"!ENABLE READING MEMORY, FIFO MODE
OUTPUT 722;"SMATH MIN 9"!LOWER LIMIT = 9(V)
OUTPUT 722;"SMATH MAX 11"!UPPER LIMIT = 11(V)
OUTPUT 722;"CSB" "!CLEAR STATUS REGISTER
OUTPUT 722;"RQS 2!ENABLE HI/LO STATUS REGISTER BIT
OUTPUT 722;"NRDGS 20"!20 READINGS/TRIGGER
OUTPUT 722;"TRIG SGL"!TRIGGER READINGS
OUTPUT 722;"MMATH PFAIL"!PERFORM POST-PROCESS PFAIL OPERATION
!PRINT FAILURE MESSAGE
!PRINT TEST PASSED MESSAGE
Keysight 3458A User's Guide