Chapter 3 Programming Your Universal Counter for Remote Operation

Programming Examples

To Optimize Throughput (HP BASIC) (Continued)

500

OUTPUT @Count;":INIT:CONT ON"

! Put counter in Run mode

510

OUTPUT @Count;"FETCH:FREQ?"

! Fetch the frequency to be used

520

ENTER @Count USING "#,K";Dummy$

! for the expected frequency.

530

OUTPUT @Count;":FREQ:EXP1 ";VAL(Dummy$)!Tell the counter what frequency

540

 

! to expect on Ch 1. This number

550

 

! must be within 10% of the input

560

 

! frequency. Using this greatly

570

 

! increases throughput. When

580

 

! high throughput is not needed,

590

 

! the expected value is not

600

 

! required.

610

FOR I=1 TO 200

 

620

TRIGGER @Count

! Trigger the counter and read

630ENTER @Count;A$(I)

640NEXT I

650 FOR I=1 TO 10

! Print first 10 measurements

660PRINT A$(I),

670NEXT I

680END

3-74

Programming Guide

Page 142
Image 142
HP 132A, 53131A manual Output @CountINITCONT on Put counter in Run mode