User manual

Programmer’s Guide Page 35 of 64
The value of segDesc->horPos is the time interval in seconds between the first data point and the nominal time
origin of the trigger delay. It is always in the range [-sampTime, 0]. It is useful for a very precise positioning, to
a fraction of the sampling interval, of the waveform. In many applications, it can be ignored. Refer to section
3.12, HORIZONTAL PARAMETERS IN ACQUIRED WAVEFORMS, for a detailed explanation of horPos.
Return values have to be interpreted in the same way as for the other readout functions.
Refer to the section 3.13, SEQUENCE ACQUISITIONS for detailed explanations on the interpretation of
segDesc->timeStampLo/Hi.
It is important to zero the unused parameters at the end of the readPar structure. An incorrect value of flags can
be very confusing.
3.11.2. Reading Sequences of Waveforms
In certain situations, see APPENDIX A: ESTIMATING DATA TRANSFER TIMES, it can be more efficient (in
time) to read Sequence Waveforms with readMode = 1 (ReadModeSeqW). This mode transfers all of the data from
the digitizer to the local memory in a single DMA as opposed to calling AcqrsD1_readData many times thus using
a transfer per segment. The price to be paid is a higher memory requirement. It can also be used to transfer blocks of
segments in the case of very large memories.
For dataType = 0 or 1, the amount of memory needed (in bytes) is
arraySize ≥ (nbrSamplesNom + currentSegmentPad) * (nbrSegments+1) * (dataType + 1)
and, for users with segmentOffset > nbrSamplesInSeg,
arraySize ≥ segmentOffset * (nbrSegments+1) * (dataType + 1) ,with
segmentOffset
, nbrSamplesInSeg ,where
the currentSegmentPad depends on the acquisition configuration and can be determined using the following
call,
Acqrs_getInstrumentInfo(instrID, ”TbSegmentPad”,
&currentSegmentPad);
for data that has already been acquired or
Acqrs_getInstrumentInfo(instrID, ”TbNextSegmentPad”,
&currentSegmentPad);
for data to be acquired after the next call to AcqrsD1_acquire.
the nbrSamplesNom is the nominal number of samples to record and may be different than what was asked
for! It can be determined using the following call,
AcqrsD1_getMemory(instrID, &nbrSamplesNom, &nbrSegments);
the nbrSegments can either be taken from the result given just above or it can be freely reduced to a smaller
value in the case of a partial read of the data.
You have to make sure that you ask for this information after the acquisition configuration has been established. This
is the case after an acquisition has been completed with the new configuration.
Similarly, for dataType = 3 the amount of memory needed (in bytes) is
arraySize ≥ 8 * segmentOffset * (nbrSegments) ,with
segmentOffset
, nbrSamplesInSeg ,and
arraySize ≥ (nbrSamplesNom + currentSegmentPad) * (nbrSegments+1) * (dataTypeADC + 1)
where dataTypeADC is 0 for the 8-bit instruments and 1 otherwise.
The following code can be used for reading a waveform sequence in 8 bit representation.