Communication processor and Modbus TCP
13.3 Point-to-point (PtP) communication
S7-1200 Programmable controller
1110 System Manual, V4.2, 09/2016, A5E02486680-AK
Port_Config (Configure communication parameters dynamically)
Table 13- 7 Port_Config (Port Configuration) instruction
REQ:=_bool_in_,
PORT:=_word_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_,
MODE:=_uint_in_,
LINE_PRE:=_uint_in_,
BRK_DET:=_uint_in_,
DONE=>_bool_out_,
ERROR=>_bool_out_,
Port_Config allows you to change port pa-
rameters such as baud rate from your pro-
gram.
You can set up the initial static configuration
of the port in the device configuration proper-
ties, or just use the default values. You can
execute the Port_Config instruction in your
program to change the configuration.
1
STEP 7 automatically creates the DB when you insert the instruction.
The CPU does not permanently store the values you set with the Port_Config instruction.
The CPU restores the parameters configured in the device configuration 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- 8 Data types for the parameters
REQ IN Bool Activate th
e 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 - Freeport protocol (Default value)
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,