HP 132A User Manual Page 151

  • Download
  • Add to my manuals
  • Print
  • Page
    / 330
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 150
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-83
To Use Limits to Filter Data Before Measuring Stats
(QuickBASIC) (Continued)
CALL sendhp(":FREQ:ARM:STAR:SOUR IMM") 'These 3 lines enable time
CALL sendhp(":FREQ:ARM:STOP:SOUR TIM") 'arming with a 0.01 second
CALL sendhp(":FREQ:ARM:STOP:TIM .01") 'gate time.
CALL sendhp(":STAT:OPER:ENABLE 256") 'Computing statistics bit in
'Operation Status Register.
CALL sendhp(":STAT:OPER:NTR 256") 'When stats are complete, the bit
CALL sendhp(":STAT:OPER:PTR 0") 'will go from high to low, so a
'negative transition is needed to
'enable the bit that is summarized
'in the Status Byte Register.
CALL sendhp("*SRE 128") 'This is the bit from the Operation
'Status register that is summarized
'in the Status Byte Register. When
'it goes high, SRQ will be asserted.
CALL sendhp(":CALC3:LFIL:STATE ON") 'Enable statistics filter
CALL sendhp(":CALC3:LFIL:LOWER " + STR$(lower)) 'Set lower stats limit
CALL sendhp(":CALC3:LFIL:UPPER " + STR$(upper)) 'Set upper stats limit
CALL sendhp(":CALC3:AVER ON") 'Enable statistics
CALL sendhp(":CALC3:AVER:COUNT " + STR$(nummeas))'Set number of measurements
'to use in statistics
'calculation
CALL sendhp(":CALC2:LIM:STATE ON") 'Enable limit testing. Must
'do this to see graph
CALL sendhp(":CALC2:LIM:LOWER " + STR$(lower)) 'Set lower limit
CALL sendhp(":CALC2:LIM:UPPER " + STR$(upper)) 'Set upper limit
CALL sendhp(":CALC2:LIM:DISP GRAPH") 'Display limit graph
ON PEN GOSUB getstats 'When SRQ happens, go get
PEN ON 'statistics
CALL IOPEN(isc&, priority%) 'Watch for interrupts
PRINT "Making Period measurements"
CALL sendhp(":INIT:CONT ON") 'Set counter to run
Loophere: 'Wait here until complete
IF complete THEN GOTO endprogram 'If stats received, then end
GOTO Loophere
getstats:
complete = 1 'Test bit
CALL IOSPOLL(source&, statusbyte) 'Check status byte
'Should be 192
CALL sendhp(":INIT:CONT OFF") 'Put counter in single
Page view 150
1 2 ... 146 147 148 149 150 151 152 153 154 155 156 ... 329 330

Comments to this Manuals

No comments