Removing the Arbitrary
Block Header
Following are two methods of removing the block data header. The first
method uses the HP BASIC programming language. The second method
uses a command from the HP 82335 HP-IB Command Library for C.
HP BASIC Example
DIM Ndig$[1],Count$[9]!dimension parameters for header
Count$ = ""!set count to zeros
ASSIGN @X TO 70905;FORMAT OFF!return unformatted data
OUTPUT 70905;"FETC1?"!retrieve readings from channel 1
ENTER @X USING "#,X,K,K";Ndig$;Count$[1;VAL(Ndig$)]
!remove header preceding 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!remove the line feed character
The parameters of the ENTER ... USING statement function as follows:
# - terminate ENTER on last ENTER item (EOI)
X - skip the # character of the header
K - enter the <non-zero digit > part of the header into the Ndig$ variable
K - enter the <digits > part of the header into the Count$ locations specified
B - retrieve one byte (the line feed) from the digitizer
Chapter 3 Understandin
g
the HP E1429 Di
g
itizer 135