Specifications

SIMATIC Instructions
9-183
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
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 LAD
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.
Freeport communication is possible only when the CPU is in the RUN mode.
Enable the Freeport mode by setting a value of 01 in the protocol select field of
SMB30 (Port 0) or SMB130 (Port 1). While in Freeport mode, communication with
the programming device is not possible.
Note
Entering Freeport mode can be controlled using special memory bit SM0.7, which
reflects the current position of the operating mode switch. When SM0.7 is equal to
0, the switch is in TERM position; when SM0.7 = 1, the operating mode switch is
in RUN position. If you enable Freeport mode only when the switch is in RUN
position, you can use the programming device to monitor or control the CPU
operation by changing the switch to any other position.