Managing Flow Control - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Communication processor and Modbus TCP
12.3 Point-to-point (PtP) communication
12.3.1.1

Managing flow control

Flow control refers to a mechanism for balancing the sending and receiving of data
transmissions so that no data is lost. Flow control ensures that a transmitting device is not
sending more information than a receiving device can handle. Flow control can be
accomplished through either hardware or software. The RS232 CM supports both hardware
and software flow control. The RS485 CM and CB do not support flow control. The 422
mode of the CM 1241 RS422/485 module supports software flow control. You specify the
type of flow control either when you configure the port (Page 672) or with the PORT_CFG
instruction (Page 686).
Hardware flow control works through the Request-to-send (RTS) and Clear-to-send (CTS)
communication signals. With the RS232 CM, the RTS signal is output from pin 7 and the
CTS signal is received through pin 8. The RS232 CM is a DTE (Data Terminal Equipment)
device which asserts RTS as an output and monitors CTS as an input.
Hardware flow control: RTS switched
If you enable RTS switched hardware flow control for an RS232 CM, the module sets the
RTS signal active to send data. It monitors the CTS signal to determine whether the
receiving device can accept data. When the CTS signal is active, the module can transmit
data as long as the CTS signal remains active. If the CTS signal goes inactive, then the
transmission must stop.
Transmission resumes when the CTS signal becomes active. If the CTS signal does not
become active within the configured wait time, the module aborts the transmission and
returns an error to the user program. You specify the wait time in the port configuration
(Page 672).
The RTS switched flow control is useful for devices that require a signal that the transmit is
active. An example would be a radio modem that uses RTS as a "Key" signal to energize the
radio transmitter. The RTS switched flow control will not function with standard telephone
modems. Use the RTS always on selection for telephone modems.
Hardware flow control: RTS always on
In RTS always on mode, the CM 1241 sets RTS active by default. A device such as a
telephone modem monitors the RTS signal from the CM and utilizes this signal as a clear-to-
send. The modem only transmits to the CM when RTS is active, that is, when the telephone
modem sees an active CTS. If RTS is inactive, the telephone module does not transmit to
the CM.
To allow the modem to send data to the CM at any time, configure "RTS always on"
hardware flow control. The CM thus sets the RTS signal active all the time. The CM will not
set RTS inactive even if the module cannot accept characters. The transmitting device must
ensure that it does not overrun the receive buffer of the CM.
Data Terminal Ready (DTR) and Data Set Ready (DSR) signal utilization
The CM sets DTR active for either type of hardware flow control. The module transmits only
when the DSR signal becomes active. The state of DSR is only evaluated at the start of the
send operation. If DSR becomes inactive after transmission has started, the transmission will
not be paused.
674
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents