| Data Acquisition Toolbox | ![]() |
The Samples to Acquire per Trigger
When a trigger executes, a predefined number of samples are acquired for each channel group member and logged to the engine or a disk file. You specify the number of samples to acquire per trigger with the SamplesPerTrigger property.
The default value of SamplesPerTrigger is calculated by the engine such that 1 second of data is collected, and is based on the default value of SampleRate. In general, to calculate the acquisition time for each trigger, you apply the formula
For example, to acquire 5 seconds of data per trigger for each channel contained by ai
set(ai,'SamplesPerTrigger',500000)
To continually acquire data, you set SamplesPerTrigger to inf.
set(ai,'SamplesPerTrigger',inf)
A continuous acquisition will stop only if you issue the stop function, or an error occurs.
| Trigger Types | Acquiring Data | ![]() |