Get Ip Address And Set Ip Address (Ethernet) - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.3 Communication
Non-fatal error conditions with ENO = 0
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
Input / output
ADDR
PORT
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
GIP
SIP
214
SM bits affected
None
Data type
Operand
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.)
BYTE
Constant
Note: The two available ports are as follows:
Integrated RS485 port (Port 0),
CM01 Signal Board (SB) RS232/RS485 port (Port 1)
Description
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.
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.
:
0 or 1
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents