Siemens Simatic S7-200 System Manual page 312

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

Advertisement

Instruction Set
Transmit, Receive
L
A
EN
D
TABLE
PORT
S
T
XMT TABLE, PORT
L
212
214
L
A
EN
D
TABLE
PORT
S
T
RCV TABLE, PORT
L
212
214
Understanding Freeport Mode
You can select the Freeport mode to control the serial communication port of the CPU by
means of the user program. When you select Freeport mode, the ladder logic program
controls the operation of the communication port through the use of the receive interrupts,
the transmit interrupts, the transmit instruction (XMT), and the receive instruction (RCV). The
communication protocol is entirely controlled by the ladder program while in Freeport mode.
SMB30 (for port 0) and SMB130 (for port 1 if your CPU has two ports) are used to select the
baud rate and parity.
The Freeport mode is disabled and normal communication is re-established (for example,
programming device access) when the CPU is in the STOP mode.
In the simplest case, you can send a message to a printer or a display using only the
Transmit (XMT) instruction. Other examples include a connection to a bar code reader, a
weighing scale, and a welder. In each case, you must write your program to support the
protocol that is used by the device with which the CPU communicates while in Freeport
mode.
10-124
The Transmit instruction invokes the transmission of the data
buffer (TABLE). The first entry in the data buffer specifies the
XMT
number of bytes to be transmitted. PORT specifies the
communication port to be used for transmission.
Operands:
The XMT instruction is used in Freeport mode to transmit data
by means of the communication port(s).
215
216
The Receive instruction invokes setup changes that initiate or
terminate the Receive Message service. You must specify a
RCV
start and an end condition for the Receive box to operate.
Messages received through the specified port (PORT) are
stored in the data buffer (TABLE). The first entry in the data
buffer specifies the number of bytes received.
Operands:
The RCV instruction is used in Freeport mode to receive data by
215
216
means of the communication port(s).
TABLE:
VB, IB, QB, MB, SMB, *VD, *AC, SB
PORT:
0 to 1
TABLE:
VB, IB, QB, MB, SMB, *VD, *AC, SB
PORT:
0 to 1
S7-200 Programmable Controller System Manual
C79000-G7076-C230-02

Advertisement

Table of Contents
loading

Table of Contents