USING THE COMBISCOPE INSTRUMENTS

3 - 69

PROGRAM EXAMPLE:

*****

’Calibrate the instrument and print the calibration result.

*****

 

Starts the calibration

CALL Send (0, 8, "*CAL?", 1)

CALL IbTMO(0,

0)

Disables the time out mechanism

response$ = "

"

 

CALL Receive (0, 8, response$, 256)

Waits for the calibration to finish and reads the result.

 

 

 

 

CALL IbTMO(0, 13)

Sets time out back to 10 seconds

IF LEFT$(response$, 1) = "0" THEN

0

= okay

PRINT "Calibration okay"

 

 

ELSE

1

= wrong

PRINT "Calibration not successful"

ENDIF

PROGRAMMING NOTE:

Status bit 0 in the operation status can be used to generate a Service Request (SRQ) when the calibration is finished, i.e., when bit 0 becomes zero. This gives you the advantage that the program can do something else until the SRQ is generated. Therefore, program the following:

ON PEN GOSUB ServReq

Defines "ServReq" routine call after SRQ

PEN ON

Enables SRQ mechanism

Send STATus:OPERation:NTRansition 1

Sets bit 0 (Calibration) true in the case of negative transition (from 1 to 0).

Send STATus:OPERation:ENABle 1

Enables bit 0 for being reported in the standard status byte (STB).

Send *SRE 128

Enables bit 7 (OPER) in Service Request Enable (SRE) register for generation of an SRQ.

Send *RST

Resets the instrument

Send *CLS

Clears the status data

Send CALibration

Starts auto calibration

Page 88
Image 88
Fluke PM-3394B, PM-3380B, PM-3390B, PM-3370B, PM-3384B user manual = okay