Siemens Simatic S7-200 System Manual page 95

Hide thumbs Also See for Simatic S7-200:
Table of Contents

Advertisement

3.
Idle line and start character: The Receive instruction can start a message with the combination of an
idle line and a start character. When the Receive instruction is executed, the receive message
function searches for an idle line condition. After finding the idle line condition, the receive message
function looks for the specified start character. If any character but the start character is received,
the receive message function restarts the search for an idle line condition. All characters received
before the idle line condition has been satisfied and before the start character has been received
are ignored. The start character is placed in the message buffer along with all subsequent
characters.
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.
Typically, you use this type of start condition when there is a protocol that specifies a minimum time
between messages, and the first character of the message is an address or something which
specifies a particular device. This is most useful when implementing a protocol where there are
multiple devices on the communications link. In this case the Receive instruction triggers an
interrupt only when a message is received for the specific address or devices specified by the start
character.
Setup:
il = 1, sc = 1, bk = 0, SMW90/SMW190 > 0, SMB88/SMB188 = start character
4.
Break detection: A break is indicated when the received data is held to a zero value for a time
greater than a full character transmission time. A full character transmission time is defined as the
total time of the start, data, parity and stop bits. If the Receive instruction is configured to start a
message on receiving a break condition, any characters received after the break condition are
placed in the message buffer. Any characters received before the break condition are ignored.
Typically, you use break detection as a start condition only when a protocol requires it.
Setup:
il = 0, sc = 0, bk = 1, SMW90/SMW190 = don't care, SMB88/SMB188 = don't care
5.
Break and a start character: The Receive instruction can be configured to start receiving characters
after receiving a break condition, and then a specific start character, in that sequence. After the
break condition, the receive message function looks for the specified start character. If any
character but the start character is received, the receive message function restarts the search for an
break condition. All characters received before the break condition has been satisfied and before
the start character has been received are ignored. The start character is placed in the message
buffer along with all subsequent characters.
Setup:
il = 0, sc = 1, bk = 1, SMW90/SMW190 = don't care,
SMB88/SMB188 = start character
6.
Any character: The Receive instruction can be configured to immediately start receiving any and all
characters and placing them in the message buffer. This is a special case of the idle line detection.
In this case the idle line time (SMW90 or SMW190) is set to zero. This forces the Receive
instruction to begin receiving characters immediately upon execution.
Setup:
il = 1, sc = 0, bk = 0, SMW90/SMW190 = 0, SMB88/SMB188 = don't care
Starting a message on any character allows the message timer to be used to time out the receiving
of a message. This is useful in cases where Freeport is used to implement the master or host
portion of a protocol and there is a need to time out if no response is received from a slave device
within a specified amount of time. The message timer starts when the Receive instruction executes
because the idle line time was set to zero. The message timer times out and terminates the receive
message function if no other end condition is satisfied.
Setup:
il = 1, sc = 0, bk = 0, SMW90/SMW190 = 0, SMB88/SMB188 = don't care
c/m = 1, tmr = 1, SMW92 = message timeout in milliseconds
S7-200 Instruction Set
Chapter 6
6
83

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents