HP (Hewlett-Packard) B Network Router User Manual


 
Example 2 Reading back PACKed data (HP BASIC program)
DIM Ndig$[1],Count$[9] Dimension parameters for header
ASSIGN @X TO 70905;FORMAT OFF
Turn format off for array data
OUTPUT 70905;"FETC1?" Query for channel 1 measurement data
ENTER @X USING "#,X,K,K";Ndig$;Count$[1;VAL(Ndig$)]
Strip the header preceeding the data
ALLOCATE INTEGER Meas_data(1:VAL(Count$)/2)
Allocate an array to hold the data
ENTER @X;Meas_data(*) Read in the measurement data
ENTER 70905 USING "B";Junk Need to strip off left over line feed
:COUNt?
FETCh[<chan>]:COUNt? returns the total number of readings stored in memory
for the channel specified. The count is the same for both channels, so either channel
may be queried.
Parameters
Parameter
Name
Parameter
Type
Range of
Values
Default
Units
chan
numeric 1 | 2 none
Comments This command is most useful after an ABORt command has been issued on a
measurement in progress. The number returned will be the number of readings
which were taken before the ABORt command forced measurements to stop. If
an infinite measurement was aborted, then the number returned will be the
maximum memory size, if more than that number of readings were taken.
Related Commands: ABORt, INITiate:IMMediate, ARM:STARt:COUNt,
TRIGger:STARt:COUNt, SENSe:SWEep:OFFSet:POINts
*RST Condition: none
Example Determining how many readings are in memory
FETC1:COUN? Query how many readings are available for
channel 1 -- this is also how many are
available on channel 2.
FETCh[
<chan>
]:COUNt?
226 Command Reference FETCh[
<chan>
] Subsystem