3.2 Simultaneous acquisition and readout (CST option)
42
Acqiris SA230E User's Manual
When an overflow occurs the writing to the stream buffers automatically stops. The already
acquired data is still valid and can be read-out.
To optimize the application data throughput it is recommended to use:
NbOfElementsToFetch
> 1 M
especially for application with high trigger rate.
When less than
NbElementsToFetch
are available, the function
StreamFetchDataInt32
(…)
returns the number of
availableElements
(on-board) and no DMA read is performed.
Data buffer allocation
For data buffer
ViInt64 sampleStreamGrain = 0;
checkApiCall(AqMD3_GetAttributeViInt64(session, sampleStreamName, AQMD3_ATTR_STREAM_
GRANULARITY_IN_BYTES, &sampleStreamGrain));
ViInt32 const alignmentOverhead = (ViInt32)sampleStreamGrain / sizeof(ViInt32) - 1;
vector<ViInt32> sampleElements(nbrSampleElementsT alignmentOv
nbrSampleElementsToFetch/2); // data alignment & data unwrapping overheads (only in single
channel mode).
// or
vector<ViInt32> sampleElements(nbrSampleElementsT alignmentOverhead); // data
alignment overhead (only in dual channel mode).
For marker buffer
ViInt64 markerStreamGrain = 0;
checkApiCall(AqMD3_GetAttributeViInt64(session, markerStreamName, AQMD3_ATTR_STREAM_
GRANULARITY_IN_BYTES, &markerStreamGrain));
ViInt32 const alignmentOverhead = (ViInt32)markerStreamGrain / sizeof(ViInt32) - 1;
vector<ViInt32> markerElements(nbrMarkerElementsT alignmentOverhead);
Data unwrapping overhead is required in single channel mode (when Channel2 is disabled).
Code example
Program examples with streaming can be found in here:
For IVI-C
C
1
:\Program Files\IVI Foundation\IVI\Drivers\AqMD3\Examples\IVI-C
Configuration
The interfaces/methods/properties (functions/attributes) listed below are provided by the Acqiris MD3
driver.
CST acquisition mode may be enabled by setting the
Streaming Mode
to
Triggered
.
1
Or the alternative drive letter where the Acqiris MD3 Software has been installed on your machine.