DIAGnostic:FETCh?

Refer to the "Memory Management" section in Chapter 3 for information on where segmented readings are stored in memory.

Both channels can be fetched interleaved by specifying DIAG:FETC3?. When both channels are fetched, the channel 1 data is the first data point, and the count specified is the number of readings to be taken on each channel, and is thus limited to 1000 per channel.

The start_addr must be divisible by 4. If it is not, then the next lowest memory location divisible by 4 will be the actual start_addr used, i.e. a start_addr of 511 would be rounded down to be 508.

Data is sent back in binary block format with a header string preceeding the data. The header is made of the ascii string: #,number_of_digits,number_of_bytes -- where # indicates binary block data, number_of_digits is how many ascii digits make up the following byte count, and number_of_bytes is the byte count. After the header, the stream of data bytes occurs. Example 2 below shows how to accomodate the header string using the HP Rocky Mountain Basic programming language.

Related Commands: ABORt, FORMat, INITiate:IMMediate, ARM:STARt:COUNt, TRIGger:STARt:COUNt, SENSe:SWEep:POINts:DELay

*RST Condition: none

Example 1 Examining readings in a portion of memory

DIAG:FETC? 5200,300

Get 300 readings from channel 1, beginning

 

at address 5200.

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;"DIAG:FETC1? 5200,300" 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

DIAGnostic Subsystem

Command Reference 219

Page 219
Image 219
HP E1429A manual Example 2 Reading back PACKed data HP Basic program, Assign @X to 70905FORMAT OFF