Siemens Simatic S7-200 System Manual page 315

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

Advertisement

Using the XMT Instruction to Transmit Data
You can use the XMT instruction to facilitate transmission. The XMT instruction lets you send
a buffer of one or more characters, up to a maximum of 255. An interrupt is generated
(interrupt event 9 for port 0 and interrupt event 26 for port 1) after the last character of the
buffer is sent, if an interrupt routine is attached to the transmit complete event. You can make
transmissions without using interrupts (for example, sending a message to a printer) by
monitoring SM4.5 or SM4.6 to signal when transmission is complete.
Using the RCV Instruction to Receive Data
You can use the RCV instruction to facilitate receiving messages. 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 SM86.
SMB86 (or SMB186) will be non-zero when the RCV box is inactive. 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 10-20 (SM86 through SM94 for port 0, and SM186 through SM194 for port 1) for
descriptions of the start and end message conditions.
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.
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02
Instruction Set
10-127

Advertisement

Table of Contents
loading

Table of Contents