HP (Hewlett-Packard) B Network Router User Manual


 
ASCii,9 format sends data back as comma separated ASCII numbers. The data is
converted internally to reflect the SENSe<chan >:VOLTage:RANGe setting, and
no further conversion is needed by the user. The optional parameter 9 is the
number of significant digits in the data. This parameter is always 9 and may not
be changed. To read this data into an array, it is first necessary to determine how
many readings are coming back from the FETCh? or READ? . If using FETCh?,
then the FETCh:COUNt? command will specify how many readings will be
returned. READ? requires the user to calculate in advance how many readings to
expect. See the next comment below for details on how to calculate number of
readings.
The number of readings that FETCh? or READ? will return for each channel can
be calculated as:
(number of start triggers) * (pre-arm readings + post-arm readings)
The above equation may be built from the following queries:
(ARM:COUNt?) * (TRIGger:COUNt?)
To determine how many readings are pre-arm, take the absolute value of the
number returned by the SENSe:SWEep:OFFSet:POINts? query.
Related Commands: READ?, FETCh?
*RST Condition: FORMat:DATA ASCii,9
Example 1 Setting the data format to 64 bit reals
FORM REAL Output data in 64 bit real format, the ",64"
is defaulted
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
FORMat[:DATA]
FORMat Subsystem Command Reference 229