Chapter 3 Programming Your Universal Counter for Remote Operation

Elements of SCPI Commands

To Measure the Statistics of 50 Measurements

(HP BASIC) (Continued)

520

OUTPUT @Count;":INIT;*OPC"

! Enable OPC bit and starts measurement

530

Loop_here:GOTO Loop_here

! Wait here until measurement complete.

540

!

 

550

Get_averages:

! Data ready

560

Serial_poll=SPOLL(703)

 

570OUTPUT @Count;":CALC3:AVERAGE:TYPE MAX;:CALC3:DATA?"

580ENTER @Count;Maximum$

590OUTPUT @Count;":CALC3:AVERAGE:TYPE MIN;:CALC3:DATA?"

600ENTER @Count;Minimum$

610OUTPUT @Count;":CALC3:AVERAGE:TYPE MEAN;:CALC3:DATA?"

620ENTER @Count;Mean$

630OUTPUT @Count;":CALC3:AVERAGE:TYPE SDEV;:CALC3:DATA?"

640ENTER @Count;Sdev$

650PRINT

660

PRINT "Serial Poll = ";Serial_poll

! Should be 96

670

PRINT

 

680

PRINT USING "21A,22A,X,8A";"Minimum Period

= ";Minimum$;" seconds"

690

PRINT USING "21A,22A,X,8A";"Maximum Period

= ";Maximum$;" seconds"

700

PRINT USING "21A,22A,X,8A";"Mean Period

= ";Mean$;" seconds"

710PRINT USING "21A,22A,X,8A";"Standard Deviation = ";Sdev$;" seconds"

720LOCAL 703

730END

Programming Guide

3-65

Page 133
Image 133
HP 53131A, 132A manual Output @CountINIT*OPC