Appendix B 237
Information for Replacing 4278A with 4288A
Example of Replacing Major Functions (comparison of programs)
B. Information for Replacing
4278A with 4288A
Status register (status report system)
Table B-23 compares the programs used by the 4278A and 4288A to detect the completion
of measurement.
Table B-24 compares the programs used by the 4278A and 4288A to detect the occurrence
of an error.
Table B-23 Comparison of programs used to detect completion of measurement
4278A 4288A
10 ASSIGN @Agt4278a TO 717
20 !
30 OUTPUT @Agt4278a;"TRIG2"
40 !
50 !
60 OUTPUT @Agt4278a;"*SRE1"
70 OUTPUT @Agt4278a;"*CLS"
80 WAIT .1
90 !
100 !
110 ON INTR Scode GOTO Meas_end
120 ENABLE INTR Scode;2
130 PRINT "Wait for External Trigger!!"
140 Meas_wait: GOTO Meas_wait
150 Meas_end: OFF INTR Scode
160 PRINT "Measurement Complete"
170 !
180 END
10 ASSIGN @Agt4288a TO 717
20 !
30 OUTPUT @Agt4288a;":TRIG:SOUR EXT"
40 !
50 OUTPUT @Agt4288a;":STAT:OPER:ENAB 16"
60 OUTPUT @Agt4288a;"*SRE 128"
70 OUTPUT @Agt4288a;"*CLS"
80 OUTPUT @Agt4288a;"*OPC?"
90 ENTER @Agt4288a;Buff$
100 !
110 ON INTR Scode GOTO Meas_end
120 ENABLE INTR Scode;2
130 PRINT "Wait for External Trigger!!"
140 Meas_wait: GOTO Meas_wait
150 Meas_end: OFF INTR Scode
160 PRINT "Measurement Complete"
170 !
180 END
Table B-24 Comparison of programs used to detect occurrence of errors
4278A 4288A
10 ASSIGN @Agt4278a TO 717
20 !
30 !
40 OUTPUT @Agt4278a;"*SRE32"
50 OUTPUT @Agt4278a;"*CLS"
60 WAIT .1
70 !
80 !
90 ON INTR 7 GOTO Err_proc
100 ENABLE INTR 7;2
110 !
120 OUTPUT @Agt4278a;"XYZ" ! Error
130 !
140 GOTO Skip_err_proc
150 Err_proc: OFF INTR 7
160 OUTPUT @Agt4278a;"ERR?"
170 ENTER @Agt4278a;Err_no
180 PRINT "Error occurred!!"
190 PRINT " No:";Err_no
200 PRINT "PROGRAM INTERRUPT!!"
210 GOTO Prog_end
220 Skip_err_proc: PRINT "PROGRAM DONE."
230 Prog_end: END
10 ASSIGN @Agt4288a TO 717
20 !
30 OUTPUT @Agt4288a;"*ESE 60"
40 OUTPUT @Agt4288a;"*SRE 32"
50 OUTPUT @Agt4288a;"*CLS"
60 OUTPUT @Agt4288a;"*OPC?"
70 ENTER @Agt4288a;Buff$
80 !
90 ON INTR 7 GOTO Err_proc
100 ENABLE INTR 7;2
110 !
120 OUTPUT @Agt4288a;"XYZ" ! Error
130 !
140 GOTO Skip_err_proc
150 Err_proc: OFF INTR 7
160 OUTPUT @Agt4288a;";:SYST:ERR?"
170 ENTER @Agt4288a;Err_no,Err_mes$
180 PRINT "Error occurred!!"
190 PRINT " No:";Err_no,"Description: "&Err_mes$
200 PRINT "PROGRAM INTERRUPT!!"
210 GOTO Prog_end
220 Skip_err_proc: PRINT "PROGRAM DONE."
230 Prog_end: END