| Contents | Index |
Real-Time Windows Target
The Analog Input block allows you to select and connect specific analog input channels to your Simulink® model. After you add an Analog Input block to your model, you can enter the parameters for its I/O driver. The following procedure uses the Humusoft® AD512 I/O board as an example:

Enter the same value you entered in the Fixed step size box from the Configuration Parameters dialog box, or an integer multiple of that value.
Enter a channel vector that selects the analog input channels you are using on this board. The vector can be any valid MATLAB® vector form. For example, to select all eight analog input channels on the AD512 board, enter
[1,2,3,4,5,6,7,8] or [1:8]
If you want to use the first three analog input channels, enter
[1,2,3]
From the list, choose the input range for all of the analog input channels you entered in the Input channels box. For example, with the AD512 board, choose -5 to 5 V.
If you want the input range to be different for different analog channels, you need to add an I/O block for each different input range.
From the list, choose from the following options:
Volts — Returns a value equal to the analog voltage.
Normalized bipolar — Returns a full range value of -1 to +1 regardless of the input voltage range.
Normalized unipolar — Returns a full range value of 0 to +1 regardless of the input voltage range. For example, an analog input range of 0 to +5 volts and -5 to +5 volts would both be converted to 0 to +1.
Raw — Returns a value of 0 to 2n -1. For example, a 12-bit A/D converter would return values of 0 to 212 -1 (0 to 4095). The advantage of this method is the returned value is always an integer with no roundoff errors.
Set to specify the type of data that the block will output to the model.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |