Getstationinfo (Read The Ip Or Mac Address Of A Profinet Io Device) - Siemens SIMATIC S7-1200 System Manual

Hide thumbs Also See for SIMATIC S7-1200:
Table of Contents

Advertisement

Extended instructions
9.7 Diagnostics (PROFINET or PROFIBUS)
9.7.6

GetStationInfo (Read the IP or MAC address of a PROFINET IO device)

The "GetStationInfo" instruction reads the IP or MAC address of a PROFINET IO device in
the local IO system or a PROFINET IO device located in a lower-level IO system (connected
using CP/CM modules).
Note
You can only use the GetStationInfo instruction with PROFINET IO devices. You cannot use
the instruction with PROFIBUS DP slaves.
Table 9- 155 GetStationInfo instruction
LAD / FBD
STEP 7 automatically creates the DB when you insert the instruction.
1
In the SCL example, "GetStationInfo_SFB_DB" is the name of the instance DB.
2
You address the IO device using the hardware identifier of the station at the LADDR
parameter. You can find the hardware ID at the following location:
PLC tags > Show all tags > System constants tab. Search for the "IODevice" in the Name
column and for "Hw_Device" in the Data type column.
Use the MODE parameter to select the information to be read.
At the DATA parameter, assign the data area to which the instruction writes the read
address data. For storing the IP address, use the "IF_CONF_v4" structure. For storing the
MAC address, use the "IF_CONF_MAC" structure.
Enable reading of the address data using the REQ control parameter. This requires the IO
device to be accessible.
460
SCL
"GetStationInfo_SFB_DB"(
REQ:=_bool_in_,
LADDR:=_uint_in_,
DETAIL:=_uint_in_,
MODE:=_uint_in_,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
DATA:=_variant_inout_);
Description
Use the GetStationInfo instruction to
read the IP or MAC address of a
PROFINET IO device. The instruction
also enables you to read the IP or
MAC address of an IO device located
in a lower-level IO system (connected
using CP/CM modules).
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMATIC S7-1200 and is the answer not in the manual?

Table of Contents

Save PDF