Main Content

RS-232 Serial Communication

The Simulink® Real-Time™ software supports RS-232 serial communication by using the serial ports on the target computer mainboard as the RS-232 I/O devices. You can initiate RS-232 communication with these serial ports and the accompanying Simulink Real-Time drivers.

The Simulink Real-Time block library supplies legacy drivers to support RS-232 communication (see RS-232 Legacy Drivers). The composite drivers support RS-232 communication in asynchronous binary mode. They provide a simple ASCII encode/decode for the send and receive RS-232 blocks.

These drivers are described as legacy because the library supports legacy RS-232 communications by using the RTOS resource manager. To use the Legacy Serial Read block and Legacy Serial Write block, set up the serial ports by using the Legacy Serial Setup block.

Serial Connections for RS-232

The Simulink Real-Time software supports serial communication by using the COM1 and COM2 ports on the target computer.

Your real-time applications can use these RS-232 ports as I/O devices. With the typical DTE/DCE configuration of the RS-232 device, the target computer is connected to the device with a null modem cable.

Serial Connection for USB to RS-232

The Simulink Real-Time software supports serial communication from USB ports on the target computer to serial devices by using a USB-to-serial adapter cable The USB-to-serial adapter should be at least USB 2.0 (preferably USB 3.0) compliant. Note that cables from some vendors may not work, despite claiming USB 2.0 compliance. The features to seek when purchasing a USB-to-serial adapter are:

  • Uses the Future Technology Devices International (FTDI) chip or uses the Prolific chip set.

  • USB serial class compliant without requiring an operating system specific driver.

To check which USB ports on the target computer are enabled and identify the USB support that the ports provide, enter the usb -vvv command at the command line by using the target computer keyboard or by using an SSH session. For more information, see Target Computer Command Line.

See Also

| | | | | | | | | | | | |

Related Topics