Data Acquisition Toolbox | ![]() ![]() |
Remove data from the data acquisition engine
Syntax
Arguments
obj |
An analog input object or array of analog input objects. |
'mode ' |
Specifies how much data is removed from the engine. |
Description
removes all data from the data acquisition engine and resets the flushdata(obj)
SamplesAvailable
property to zero.
removes data from the data acquisition engine depending on the value of flushdata(obj,'
mode
')
mode
. If mode
is all
, all data is removed from the engine and the SamplesAvailable
property is set to 0. This is the same as flushdata(obj)
. If mode
is triggers
, then data is removed from the engine only when the data corresponds to an integral number of triggers. triggers
is a valid choice only when the TriggerRepeat
property is greater than 0 and the SamplesPerTrigger
property is not inf
.
Example
Create the analog input object ai
for a National Instruments board and add hardware channels 0-7 to it.
A two-second acquisition is configured and the device object is executed.
set(ai,'SampleRate',2000) duration = 2; ActualRate = get(ai,'SampleRate'); set(ai,'SamplesPerTrigger',ActualRate*duration) start(ai)
Four thousand samples will be acquired for each channel group member. To extract 1000 samples from the data acquisition engine for each channel:
You can use flushdata
to remove the remaining 3000 samples from the data acquisition engine.
Functions
Properties
SamplesAvailable
, SamplesPerTrigger
, TriggerRepeat
![]() | disp | get | ![]() |