User`s guide

I/O Driver Blocks
4-7
I/O Driver Blocks
The Analog Input, Analog Output, Digital Input, Digital Output, Counter
Input, and Encoder Input blocks provide an interface to your physical I/O
boards and your real-time application. They ensure that the C code generated
with Real-Time Workshop correctly maps block diagram signals to the
appropriate I/O channels.
You can have multiple blocks associated with each type of I/O block and board.
For example, you can have one Analog Input block for channels 1 to 4 and
another block for channels 5 to 8.
This section includes the following topics:
“Real-Time Windows Target Library” on page 4-7
— Add an Analog Input
block to your Simulink model from the Real-Time Windows Target block
library
“Simulink Library” on page 4-9
— Add an Analog Input block to your
Simulink model from the Simulink block library
“Analog Input Block” on page 4-10
— Select analog input channels and
voltage range
“Analog Output Block” on page 4-12 — Select analog output channels,
voltage range, initial values, and final values
“Digital Input Block” on page 4-15
— Select digital lines or channels
“Digital Output Block” on page 4-16
Select digital lines or channels, initial
values, and final values
“Counter Input Block” on page 4-19 — Select and connect specific counter
input channels to your Simulink model
“Encoder Input Block” on page 4-22 — Select and connect specific encoder
input channels to your Simulink model
Real-Time Windows Target Library
This topic describes how to access the Real-time Windows Target library from
the MATLAB Command Window. The Real-Time Windows Target I/O driver
blocks allow you to select and connect specific analog channels and digital lines
to your Simulink model through I/O driver blocks.