Specifications
2 RS232 I/O Support
2-8
Adding RS-232 Driver Blocks (Synchronous)
You add RS-232 driver blocks to your Simulink model when you want to use
the serial ports on the target PC for I/O.
After you create a Simulink model, you can add xPC Target driver blocks and
define the initialization, send/receive, and termination message structures.
1 In the MATLAB command window, type
xpclib
The xPC Target driver block library opens.
2 Double-click the RS-232 group block.
A window with blocks for RS-232 drivers opens.
Note This library contains two setup blocks. The second block is included for
compatibility with xPC Target Version 1.0.
Alternatively, you could access the xPC Target block library from the
Simulink Library Browser. In the Simulink window, and from the
View
menu, click
Show Library Browser. In the left pane, double-click xPC
Target
, and then click RS-232.
3 Drag-and-drop an RS-232 Setup block to your Simulink model.