Communication
8.6 RS485
S7-200 SMART
System Manual, V2.3, 07/2017, A5E03822230-AF
465
8.6.6
Freeport mode
8.6.6.1
Creating user-defined protocols with Freeport mode
Introduction
Freeport mode allows your program to control the communication port of the
S7-200 SMART CPU. You can use Freeport mode to implement user-defined
communication protocols to communicate with many types of intelligent devices. Freeport
mode supports both ASCII and binary protocols.
Using Freeport mode
To enable Freeport mode, you use special memory bytes SMB30 (for the Integrated RS485
port (Port 0)) and, if your CPU model supports it, SMB130 (for the CM01 Signal Board (SB)
port (Port 1)). Your program uses the following to control the operation of the communication
port:
●
Transmit instruction (XMT) and the transmit interrupt:
The Transmit instruction allows the S7-200 SMART CPU to transmit up to 255 characters
from the COM port. The transmit interrupt notifies your program in the CPU when the
transmission has been completed.
●
Receive character interrupt:
The receive character interrupt notifies the user program that a character has been
received on the COM port. Your program can then act on that character, based on the
protocol being implemented.
●
Receive instruction (RCV):
The Receive instruction receives the entire message from the COM port and then
generates an interrupt for your program when the message has been completely
received. You use the SM memory of the CPU to configure the Receive instruction for
starting and stopping the receiving of messages, based on defined conditions. The
Receive instruction allows your program to start or stop a message based on specific
characters or time intervals. Most protocols can be implemented with the Receive
instruction, instead of using the more cumbersome receive-character interrupt method.