The DIAGnostic:MEMory:ADDResses? command returns a list of 32-bit integers for each segment in memory. In each 32-bit list, bit 1 is the aborted flag and bit 0 is the memory wrapped flag. Bit 31 through

bit 2 is the value of the address counter for that segment. Thus, to obtain the memory address only, a divide by 4 (right shift of 2) of the 32-bit list must be done. Since the address counter points to the memory location where the next reading will be stored, the address should be decremented by 1 before use.

As an example, assume: ARM:COUN 5; SENS:SWE:POIN -20; TRIG:COUN 35

Because of the ARM:COUN specified memory is divided into eight segments (Table 3-5), each of which could contain up to 65536 readings. For ARM:COUN 5, only five of the eight possible segments will be used, starting with the segment that begins at address 0 and ends at address 65535.

The ending address for each of the five segments can be calculated from the equation:

ending segment address = segment_number * 65536 - 1

This yields the following ending addresses for the five segments:

segment 1 = 65535 segment 2 = 131071 segment 3 = 196607 segment 4 = 262143 segment 5 = 327679

Assume you want to read the data from segment number 4. Then, the number of readings = 35 + 1 = 36 (padded to make divisable by 4). The first reading in the segment is at address:

first address = ending segment address - (number of readings - 1)

262143 - (36 - 1) = 262108

If the readings in the memory segment did not wrap around, the address 262108 and count 35 would be specified in the DIAGnostic:FETCh? command.

If, for example, readings in the segment did wrap around, then the starting address specified in the DIAGnostic:FETCh? command will not be the first address in the segment where a reading is stored. To determine the starting address, use the DIAGnostic:MEMory:ADDRess? command and get the 32 bits representing the 4th segment (this would be the 13th through 16th bytes in the block of data returned).

144 Understanding the HP E1429 Digitizer

Chapter 3

Page 144
Image 144
HP E1429A manual Ending segment address = segmentnumber * 65536