| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
The xPC Target product includes a Simulink block library for I/O drivers. The highest hierarchical level in the library is grouped by I/O function. The second level is grouped by board manufacturer. The manufacturer groups within this second level contain the driver blocks for specific boards.
This procedure uses the Simulink model xpc_osc.mdl as an example of how to add and connect I/O blocks:
xpclib
The Library: xpclib window opens.

Alternatively, you can access the I/O driver library with the Simulink Library Browser.
Open a function group. For example, to open the A/D group, double-click the A/D block.
The manufacturer level opens.

Within each manufacturer group are the blocks for a single function.
Open a manufacturer group. For example, to open the A/D driver blocks from Measurement Computing, double-click the group marked Measurement Computing.
The window with the A/D driver blocks for Measurement Computing opens.

xpc_osc
The Simulink block diagram opens for the model xpc_osc.mdl.

From the block library, click and drag the name of an A/D board to the Simulink block diagram. Likewise, click and drag the name of a D/A board to your model.
The Simulink software adds the new I/O blocks to your model.
Remove the Signal Generator block and add the Analog Input block in its place. Remove the Scope block and add the Analog Output block in its place.
The demo model xpcosc should look like the figure shown below.

You cannot run this model unless you have the I/O board shown installed in your target PC. However, you can substitute the driver blocks for another I/O board that is installed in the target PC.
Your next task is to define the I/O block parameters. See Defining I/O Block Parameters.
![]() | I/O Driver Blocks | Adding I/O Blocks with the Simulink Library Browser | ![]() |

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