Stop device object
Note: You cannot use the legacy interface on 64-bit MATLAB®. See Working with the Session-Based Interface to acquire and generate data on a 64-bit MATLAB.
An analog input object automatically stops when the requested samples are acquired or data is missed. An analog output object automatically stops when the queued data is output. These two device objects can also stop executing under one of these conditions:
The Timeout property value is reached.
A run-time error occurs.
For analog input objects, stop must be used when the TriggerRepeat property or SamplesPerTrigger property is set to inf. For analog output objects, stop must be used when the RepeatOutput property is set to inf. When stop is issued for either of these device objects,
The Running property is set to Off.
The Logging property or Sending property is set to Off.
The callback function specified for StopFcn is executed.
The stop event is recorded in the EventLog property.
All pending callbacks for this object are discarded.
For any device object, you can specify stop as the value for a callback property.
ao.TimerFcn = @stop;