EasyManua.ls Logo

HP 53131A/132A 225 MHz - To Optimize Throughput (HP BASIC)

HP 53131A/132A 225 MHz
330 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 3 Programming Your Universal Counter for Remote Operation
Elements of SCPI Commands
Programming Guide 3-73
To Optimize Throughput (HP BASIC)
10 ! This program shows how to set up the counter to transfer data at the
20 ! fastest possible rate. Note that the arming mode is AUTO. This mode
30 ! provides the least resolution of all arming modes.
40 ! The program comments discuss the meaning of each command.
50 ! ASCII result format is to preserve resolution.
60 !
70 CLEAR SCREEN
80 INTEGER I
90 DIM A$(200)[22],Dummy$[22]
100 ASSIGN @Count TO 703
110 CLEAR 703 ! Clear the counter and interface
120 OUTPUT @Count;"*RST" ! Reset the counter
130 OUTPUT @Count;"*CLS" ! Clear event registers and error queue
140 OUTPUT @Count;"*SRE 0" ! Clear service request enable register
150 OUTPUT @Count;"*ESE 0" ! Clear event status enable register
160 OUTPUT @Count;":STAT:PRES" ! Preset enable register and transition
170 ! filters for operation and questionable
180 ! status structures.
190 ! The following lines will provide the highest throughput, regardless
200 ! of the state of the counter before these lines are executed.
210 OUTPUT @Count;":FORMAT ASCII" ! ASCII format for fastest throughput
220 OUTPUT @Count;":FUNC 'FREQ 1'" ! Select frequency
230 OUTPUT @Count;":EVENT1:LEVEL 0" ! Set Ch 1 trigger level to 0 volts
240 OUTPUT @Count;":FREQ:ARM:STAR:SOUR IMM" ! These two lines enable the
250 OUTPUT @Count;":FREQ:ARM:STOP:SOUR IMM" ! AUTO arming mode.
260 OUTPUT @Count;":ROSC:SOUR INT" ! Use internal oscillator. If
270 ! you want to use an external
280 ! timebase, you must select it
290 ! and turn off the automatic
300 ! detection using:
310 ! :ROSC:EXT:CHECK OFF
320 !
330 OUTPUT @Count;":DIAG:CAL:INT:AUTO OFF" ! Disable automatic interpolater
340 ! calibration. The most recent
350 ! calibration values are used in
360 ! the calculation of frequency
370 OUTPUT @Count;":DISP:ENAB OFF" ! Turn off the counter display
380 ! This greatly increases
390 ! measurement throughput.
400 OUTPUT @Count;":CALC:MATH:STATE OFF" ! Disable any post processing.
410 OUTPUT @Count;":CALC2:LIM:STATE OFF"
420 OUTPUT @Count;":CALC3:AVER:STATE OFF"
430 OUTPUT @Count;":HCOPY:CONT OFF" ! Disable any printing operation
440 OUTPUT @Count;"*DDT #15FETC?" ! Define the Trigger command
450 ! This means the command FETC?
460 ! does not need to be sent for
470 ! every measurement, decreasing
480 ! the number of bytes
490 ! transferred over the bus.

Table of Contents

Related product manuals