Main Content

Modem Control

Control state of RTS and DTR output lines on serial port

Since R2020b

  • Modem Control block

Libraries:
Simulink Real-Time / RS232 / Mainboard

Description

The Modem Control block controls the state of either or both of the Request To Send (RTS) and Data Terminal Ready (DTR) output lines on the serial port. To choose which output lines to control, select the RTS and DTR parameters.

Ports

Input

expand all

The behavior of the block is:

  • RTS > 0.5 — The block asserts the RTS control bit to true. The output goes to a positive voltage.

  • RTS ≤ 0.5 — The block asserts the RTS control bit to false. The output goes to a negative voltage.

Dependency

If the RTS parameter is off, this input has no effect.

The behavior of the block is:

  • DTR > 0.5 — The block asserts the DTR control bit to true. The output goes to a positive voltage.

  • DTR ≤ 0.5 — The block asserts the DTR control bit to false. The output goes to a negative voltage.

Dependency

If the DTR parameter is off, this input has no effect.

Parameters

expand all

Select this check box to control the RTS line for this board.

Programmatic Use

rts

Select this check box to control the DTR line for this board.

Programmatic Use

dtr

Selects the RS232 serial port for communications. If using USB-to-serial adapters, the target computer detects these adapters as serusb1, serusb2, and so on in the order that the adapters are connected to the serial devices. The order of port assignment is retained through the power cycle of the target computer or serial device if there is no change in the connections to the ports.

Programmatic Use

port

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b