Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-69
To Perform a Time Interval Calibration (HP BASIC)
Early versions of the Counter cannot execute this program since they do not
support calibration security or “fine” time interval calibration.
10 ! This program shows you how to perform a TIME INTERVAL calibration
20 ! using HP-IB. There are two types of Time Interval calibration:
30 ! a quick calibration, requiring a simple calibration signal, and
40 ! a FINE calibration, requiring a more complex signal--but producing
50 ! a better result. Both calibrations are coded below.
60 ! When you perform a calibration, the additional steps required
70 ! include: storing a backup copy of old calibration data, using
80 ! the security system to UNSECURE the counter prior to calibration,
90 ! using the security system to SECURE the counter after calibration.
100 ! These tasks are coded below.
110 !
120 ! PROGRAM SHOWS:
130 ! FINE Time Interval Calibration
140 ! QUICK Time Interval Calibration
150 !
160 ! Storing current calibration values before recalibrating--as a backup
170 ! Restoring the backup calibration values
180 !
190 ! SECURING and UNSECURING the counter
200 !
210 !
220 DIM Cal_data$[57] ! Array to hold calibration data
230 DIM Err_string$[255] ! Array to hold error message
240 CLEAR SCREEN
250 ASSIGN @Count TO 703 ! Assign I/O path for Counter
260 ASSIGN @Cal TO 708 ! Assign I/O path for Calibrator
270 ! used only for the FINE calibration
280 !
290 GOSUB Init
300 GOSUB Store_cal
310 GOSUB Unsecure
320 !
330 INPUT "Which calibration: QUICK or FINE?",Answer$
340 IF Answer$[1,1]="f" OR Answer$[1,1]="F" THEN
350 GOSUB Cal_fine
360 ELSE
370 GOSUB Cal_quick
380 END IF
390 !
400 GOSUB Restore_cal
410 GOSUB Resecure
420 GOTO End
430 Init: !
NOTE