Specifications

RS-232 Simulink Block Reference
2-27
RS-232 Simulink Block Reference
xPC Target supports RS-232 communication with driver blocks in your
Simulink model and message structures in the MATLAB workspace.
This section includes the following topics:
RS-232 Setup Block — Sends the initialize and termination messages. You
need one Setup block for each RS-232 port you use in your model.
“RS-232 Send/Receive Block (Synchronous) — Sequences the send and
receive messages for synchronous serial communication.
RS-232 Send Block (Asynchronous) Sequences the send messages.
RS-232 Receive Block (Asynchronous) — Sequences the receive messages.
RS-232 Setup Block
The Block Parameters dialog box for the RS-232 Setup block contains the
following fields.
Parameter Description
Port From the list, choose COM1, COM2, COM3, or COM4. This
is the serial connection the target PC uses to communicate
with the RS-232 device.
Baudrate From the list, choose
115200, 57600, 38400, 19200, 9600,
4800, 2400, 1200, 300, or 110.
Number of
Databits
From the list, choose either
7, or 8.
Number of
Stopbits
From the list, choose
1 or 2.
Parity From the list, choose
None, Odd, or Even.
Protocol From the list, choose
None, or XOnXOff. If your serial
device does not support hardware handshaking, or your
application software requires XOn/XOff handshaking, you
might need to choose XOn/XOff