Program instructions
7.3 Communication
S7-200 SMART
206
System Manual, V2.3, 07/2017, A5E03822230-AF
The Receive instruction supports several start conditions:
1.
Idle line detection:
The idle line condition is defined as a quiet or idle time on the
transmission line. A receive is started when the communications line has been quiet or
idle for the number of milliseconds specified in SMW90 or SMW190. When the Receive
instruction in your program is executed, the receive message function initiates a search
for an idle line condition. If any characters are received before the idle line time expires,
the receive message function ignores those characters and restarts the idle line timer
with the time from SMW90 or SMW190. See the following figure. After the idle line time
expires, the receive message function stores all subsequent characters received in the
message buffer.
The idle line time should always be greater than the time to transmit one character (start
bit, data bits, parity and stop bits) at the specified baud rate. A typical value for the idle
line time is three character times at the specified baud rate.
You use idle line detection as a start condition for binary protocols, protocols where there
is not a particular start character, or when the protocol specifies a minimum time between
messages.
Setup: il = 1, sc = 0, bk = 0, SMW90/SMW190 = idle line timeout in milliseconds
①
Receive instruction is executed: Starts the idle time
②
Restarts the idle time
③
Idle time is detected: Starts the Receive Message function
④
First character is placed in the message buffer
2.
Start character detection:
The start character is any character which is used as the first
character of a message. A message is started when the start character specified in
SMB88 or SMB188 is received. The receive message function stores the start character
in the receive buffer as the first character of the message. The receive message function
ignores any characters that are received before the start character. The start character
and all characters received after the start character are stored in the message buffer.
Typically, you use start character detection for ASCII protocols in which all messages
start with the same character.
Setup: il = 0, sc = 1, bk = 0, SMW90/SMW190 = don't care, SMB88/SMB188 = start
character