Program instructions
7.3 Communication
S7-200 SMART
214
System Manual, V2.3, 07/2017, A5E03822230-AF
Non-fatal error conditions with ENO = 0
SM bits affected
•
006H Indirect address
•
0004H Attempted to perform a
SET_ADDR instruction in an interrupt
routine
•
0090H Port number is invalid
•
0091H Port address is invalid
None
Input / output
Data type
Operand
ADDR
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant
(A constant value is valid only for the Set Port Address instruction.)
PORT
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)
7.3.4
Get IP address and set IP address (Ethernet)
You can use the GIP_ADDR and SIP_ADDR instructions to read and set the Ethernet IP
address, the subnet mask, and gateway address for the Ethernet port.
Note
The CPU models CPU CR20s, CPU CR30s, CPU CR40s, and CPU CR60s have no
Ethernet port and do not support any functions related to the use of Ethernet
communications.
LAD / FBD
STL
Description
GIP ADDR, MASK, GATE
The GIP_ADDR instruction copies the CPU’s IP address into ADDR, the
CPU’s subnet mask into MASK, and the CPU’s gateway into GATE.
SIP ADDR, MASK, GATE
The SIP_ADDR instruction sets the CPU’s IP address to the value found
in ADDR, the CPU’s subnet mask to the value found in MASK, and the
CPU’s gateway to the value found in GATE.