RS232 State

Monitor board state information from send/receive block

  • Library:
  • Simulink Real-Time / RS232

Description

The RS232 State block monitors the UART status that comes from a receive port of a send/receive block. The driver puts the UART status in 16-bit or 32-bit data streams. The RS232 State block looks at this status. Only the FIFO Read block passes this status information to its output port.

The RS232 State block accumulates errors over the whole input vector. An output error state is true if it is true for any byte in the input vector.

Ports

Input

expand all

The error status depends upon the data type of input vector D:

  • int16, uint16 — The upper byte contains the error status bits from the UART.

  • int8, uint8 — No error status is available. The Boolean outputs are false.

Output

expand all

Passes through the input vector D.

If the hardware FIFO in the UART is full when a character on the serial port enters the UART, this output is true.

Dependency

To make this output visible, select the Overrun error output parameter.

If any byte in the input vector fails the parity check, this output is true.

Dependency

To make this output visible, select the Parity error output parameter.

If a framing error occurs on any character in this vector, this output is true. For example, a framing error can occur if the baud rates between the transmitter and receiver do not match.

Dependency

To make this output visible, select the Framing error output parameter.

If the UART detects a serial line break condition, this output is true. A line break interrupt is not an error, but the UART treats it like an error state.

To detect a line break condition, the UART checks how long the serial line remains at voltage 0 (not mark and not space). If the line is at voltage 0 for longer than the time required to receive one character, the UART detects a line break. For some serial I/O port modules, disconnecting the serial cable does not cause a line break.

Dependency

To make this output visible, select the Break interrupt output parameter.

Parameters

expand all

Select this check box to retrieve overrun error output.

Selecting this parameter makes the O port visible.

Programmatic Use

Block Parameter: overrun

Select this check box to retrieve parity error output.

Selecting this parameter makes the P port visible.

Programmatic Use

Block Parameter: parity

Select this check box to retrieve framing error output.

Selecting this parameter makes the F port visible.

Programmatic Use

Block Parameter: frame

Select this check box to retrieve break interrupt output.

Selecting this parameter makes the B port visible.

Programmatic Use

Block Parameter: breakint

Introduced in R2008a