User`s guide
I/O Driver Blocks
4-15
Digital Input Block
The Real-Time Windows Target I/O blocks allow you to select and connect
specific digital lines or digital channels to your Simulink model.
After you have added a Digital Input block to your Simulink model, you can
enter the parameters for this I/O driver. This procedure uses Humusoft’s
AD512 I/O board as an example:
1 Double-click the Digital Input block.
The
Block Parameters: Digital Input dialog box opens.
2 In the Sample time box, enter the same value you entered in the Fixed step
size
box from the Configuration Parameters dialog box. For example,
enter
0.001
3 In the Input channels box, enter a channel vector that selects the digital
input channels you are using on this board. The vector can be any valid
MATLAB vector form. For example, to select all eight digital 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 four digital input lines, enter
[1,2,3,4]
If you have one 8-bit digital channel, enter [1]. If you have two 8-bit digital
channels, enter
[1 9], and from the Channel mode list, choose Byte.