Program instructions
7.3 Communication
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
191
Get IP address and set IP address (Ethernet)
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.
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.
Non-fatal errors with ENO = 0
• 006H Indirect address
• 0004H Attempted to execute a
SIP_ADDR instruction in an interrupt
routine
• IP address cannot be changed (see
following note)
• IP address is invalid for the current
subnet
None
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
In order to use the SIP_ADDR instruction, the
"IP address data is fixed to the values
below and cannot be changed by other means"
checkbox must be unchecked. This
configuration checkbox is located in the "System Block", "Communication" node in the
"Ethernet" field.
The IP address, subnet mask, and gateway values are written to persistent memory.