EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication processor and Modbus TCP
13.6 Legacy PtP communication (CM/CB 1241 only)
S7-1200 Programmable controller
1218 System Manual, V4.2, 09/2016, A5E02486680-AK
13.6.1
Legacy point-to-point instructions
13.6.1.1
PORT_CFG (Configure communication parameters dynamically)
Table 13- 92 PORT_CFG (Port Configuration) instruction
LAD / FBD
SCL
Description
"PORT_CFG_DB"(
REQ:=_bool_in_,
PORT:=_uint_in_,
PROTOCOL:=_uint_in_,
BAUD:=_uint_in_,
PARITY:=_uint_in_,
DATABITS:=_uint_in_,
STOPBITS:=_uint_in_,
FLOWCTRL:=_uint_in_,
XONCHAR:=_char_in_,
XOFFCHAR:=_char_in_,
WAITTIME:=_uint_in_,
DONE=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_);
PORT_CFG allows you to change port parameters
such as baud rate from your program.
You can set up the initial static configuration of the
port in the device configuration properties, or just use
the default values. You can execute the PORT_CFG
instruction in your program to change the configura-
tion.
1
STEP 7 automatically creates the DB when you insert the instruction.
The PORT_CFG configuration changes are not permanently stored in the CPU. The
parameters configured in the device configuration are restored when the CPU transitions
from RUN to STOP mode and after a power cycle. See Configuring the communication ports
(Page 1093) and Managing flow control (Page 1095) for more information.
Table 13- 93 Data types for the parameters
Parameter and type
Data type
Description
REQ IN Bool
Activate the configuration change on rising edge of this input. (Default value:
False)
PORT IN PORT After you install and configure a CM or CB communication device, the port
identifier appears in the parameter helper drop-list available at the PORT
box connection. The assigned CM or CB port value is the device configura-
tion property "hardware identifier". The port symbolic name is assigned in
the "System constants" tab of the PLC tag table. (Default value: 0)
PROTOCOL IN UInt 0 - Point-to-Point communication protocol (Default value)
1..n - future definition for specific protocols
BAUD IN UInt Port baud rate (Default value: 6):
1 = 300 baud, 2 = 600 baud, 3 = 1200 baud, 4 = 2400 baud, 5 = 4800 baud,
6 = 9600 baud, 7 = 19200 baud, 8 = 38400 baud, 9 = 57600 baud,
10 = 76800 baud, 11 = 115200 baud
PARITY IN UInt Port parity (Default value: 1):
1 = No parity, 2 = Even parity, 3 = Odd parity, 4 = Mark parity,
5 = Space parity
DATABITS IN UInt Bits per character (Default value:1):
1 = 8 data bits, 2 = 7 data bits

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals