HP 132A User Manual Page 135

  • Download
  • Add to my manuals
  • Print
  • Page
    / 330
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 134
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-67
To Use Limits to Filter Data Before Measuring Stats (HP
BASIC) (Continued)
500 OUTPUT @Count;":CALC3:LFIL:STATE ON" ! Enable statistics filter
510 OUTPUT @Count;":CALC3:LFIL:LOWER ";Lower ! Set the lower limit
520 OUTPUT @Count;":CALC3:LFIL:UPPER ";Upper ! Set the upper limit
530 OUTPUT @Count;":CALC3:AVER ON" ! Enable statistics
540 OUTPUT @Count;":CALC3:AVER:COUNT ";Num_meas! Set number of
550 ! measurements for stats.
560 OUTPUT @Count;":CALC2:LIM:STATE ON" ! Enable limit testing. This
570 ! must happen in order to
580 ! see the limit graph.
590 OUTPUT @Count;":CALC2:LIM:LOWER ";Lower ! Set the limits lower limit
600 OUTPUT @Count;":CALC2:LIM:UPPER ";Upper ! Set the limits upper limit
610 OUTPUT @Count;":CALC2:LIM:DISP GRAPH" ! Display the limit graph
620 !
630 ON INTR 7 GOTO Stats_ready ! Where to go when statistics ready
640 ENABLE INTR 7;2 ! Enable interrupt on SRQ
650 PRINT "Waiting for measurement to complete"
660 OUTPUT @Count;":INIT:CONT ON" ! Set counter to RUN
670 Loop_here: !WAITING FOR STATISTICS TO COMPLETE
680 GOTO Loop_here
690 !
700 Stats_ready: !Statistics are ready
710 S=SPOLL(703) ! Serial poll to see if correct bit is set.
720 OUTPUT @Count;":INIT:CONT OFF" ! Stop making new measurements
730 OUTPUT @Count;":CALC3:AVERAGE:TYPE MAX;:CALC3:DATA?"
740 ENTER @Count;Maximum$
750 OUTPUT @Count;":CALC3:AVERAGE:TYPE MIN;:CALC3:DATA?"
760 ENTER @Count;Minimum$
770 OUTPUT @Count;":CALC3:AVERAGE:TYPE MEAN;:CALC3:DATA?"
780 ENTER @Count;Mean$
790 OUTPUT @Count;":CALC3:AVERAGE:TYPE SDEV;:CALC3:DATA?"
800 ENTER @Count;Sdev$
810 PRINT
820 PRINT "Serial Poll Result = ";S ! Should be 192
830 PRINT
840 PRINT USING "21A,22A,X,8A";"Minimum Period = ";Minimum$;" seconds"
850 PRINT USING "21A,22A,X,8A";"Maximum Period = ";Maximum$;" seconds"
860 PRINT USING "21A,22A,X,8A";"Mean Period = ";Mean$;" seconds"
870 PRINT USING "21A,22A,X,8A";"Standard Deviation = ";Sdev$;" seconds"
880 LOCAL 703 ! Put counter is local
890 END
Page view 134
1 2 ... 130 131 132 133 134 135 136 137 138 139 140 ... 329 330

Comments to this Manuals

No comments