Siemens Simatic S7 Series System Manual page 179

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Non-fatal errors with ENO = 0
0006H Indirect address
0009H Simultaneous Trans-
mit/Receive on port 0
000BH Simultaneous Trans-
mit/Receive on port 1
0090H Port number is invalid
Receive parameter error sets
SM86.6 or SM186.6
CPU is not in Freeport mode
Input / output
TBL
PORT
Using Freeport mode to control the serial communications port
You can select the Freeport mode to control the serial communications port of the CPU by
means of the user program. When you select Freeport mode, your program controls the
operation of the communications port through the use of the receive interrupts, the transmit
interrupts, the Transmit instruction, and the Receive instruction. The communications
protocol is entirely controlled by the user program while in Freeport mode. SMB30 and
SMB130 are used to select the baud rate and parity.
Two special memory bytes are assigned to the two physical ports:
● SMB30 to the integrated RS485 port (Port 0)
● SMB130 to the CM01 RS232/RS485 Signal Board (SB) port (Port 1)
The Freeport mode is disabled and normal communications are re-established (for example,
HMI device access) when the CPU is in 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
weigh 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 communications are possible only when the CPU is in 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 an HMI on the same port is
not possible.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
SM bits affected
SM 86.6 Receive message terminated on port 0
SM 186.6 Receive message terminated on port 1
Data type
Operand
BYTE
IB, QB, VB, MB, SMB, SB, *VD, *LD, *AC
BYTE
Constant: 0 or 1
Note: The two available ports are as follows:
Integrated RS485 port (Port 0),
CM01 Signal Board (SB) RS232/RS485 port (Port 1)
Program instructions
7.3 Communication
179

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents