Xmt Buffer Format; Using The Rcv Instruction To Receive Data - Siemens SIMATIC S7-200 System Manual

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

Advertisement

The XMT instruction can be used to generate a BREAK condition by setting the
number of characters to zero and then executing the XMT instruction. This
generates a BREAK condition on the line for 16-bit times at the current baud rate.
Transmitting a BREAK is handled in the same manner as transmitting any other
message, in that a XMT interrupt is generated when the BREAK is complete and
SM4.5 or SM4.6 signal the current status of the XMT.
The format of the XMT buffer is shown in Figure 9-72.
Figure 9-72

Using the RCV Instruction to Receive Data

The RCV instruction lets you receive a buffer of one or more characters, up to a
maximum of 255. An interrupt is generated (interrupt event 23 for port 0 and
interrupt event 24 for port 1) after the last character of the buffer is received, if an
interrupt routine is attached to the receive message complete event.
You can receive messages without using interrupts by monitoring SMB86. SMB86
(or SMB186) will be non-zero when the RCV box is inactive or has been
terminated. It will be zero when a receive is in progress.
The RCV instruction allows you to select the message start and message end
conditions. See Table 9-26 (SM86 through SM94 for port 0, and SM186 through
SM194 for port 1) for descriptions of the start and end message conditions. The
format of the RCV buffer is shown in Figure 9-73.
Note
The Receive Message function is automatically terminated by an overrun or a
parity error. You must define a start condition (x or z), and an end condition (y, t, or
maximum character count) for the Receive Message function to operate.
Figure 9-73
S7-200 Programmable Controller System Manual
A5E00066097-02
M
E
count
where: count the number of bytes to transmit (byte field)
M E ... the message characters

XMT Buffer Format

start
M
count
char
RCV Buffer Format
S
S
A
G
E
S
S
A
G
SIMATIC Instructions
E
end
E
char
9-189

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents