Chapter 3 Programming Your Universal Counter for Remote Operation

Elements of SCPI Commands

 

 

To Perform a Time Interval Calibration (HP BASIC)

 

Early versions of the Counter cannot execute this program since they do not

NOTE

 

 

 

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

 

300GOSUB Store_cal

310GOSUB Unsecure

320!

330INPUT "Which calibration: QUICK or FINE?",Answer$

340IF Answer$[1,1]="f" OR Answer$[1,1]="F" THEN

350GOSUB Cal_fine

360ELSE

370GOSUB Cal_quick

380END IF

390!

400GOSUB Restore_cal

410GOSUB Resecure

420GOTO End

430Init: !

Programming Guide

3-69