Analog Input (Single Sample)
Acquire single sample from multiple analog channels of data acquisition device
Libraries:
Data Acquisition Toolbox
Description
The Analog Input (Single Sample) block opens, initializes, configures, and controls an analog data acquisition device. The opening, initialization, and configuration of the device occur once at the start of the model execution. The block acquires a single sample every time step, synchronously from the device, during the model run time.
The block has no input ports. It has one or more output ports, depending on the configuration you choose in its dialog box.
Use the Analog Input (Single Sample) block to incorporate live measured data into Simulink® for:
System characterization
Algorithm verification
System and algorithm modeling
Model and design validation
Controller design
Analog input acquisition is done synchronously, according to the following diagram.
At the first time step (T1), data is acquired from the selected hardware channels. The simulation does not continue until data is read from all channels.
Notes
To use this block, you need both Data Acquisition Toolbox™ and Simulink software.
Some devices are not supported by the Simulink blocks in Data Acquisition Toolbox. To see if your device supports Simulink, refer to Supported Hardware.
You can use Analog Input (Single Sample) block only with devices that support single sample acquisition. If the device does not support single sample acquisition, the model generates an error. To acquire data from devices that do not support acquisition of a single sample (such as devices designed for sound and vibration), use the Analog Input block.
Other Supported Features
If you have DSP System Toolbox™, you can use this block for signal applications.
This block supports the use of text accelerator mode, but not Rapid Accelerator or code generation.
The block supports the use of model referencing, so that your model can include other Simulink models as modular components.
For more information on these features, see the Simulink documentation.
Ports
Output
Parameters
Version History
Introduced in R2016b