Setprofinetname Method - Siemens SIMATIC S7 User Manual

Simatic automation tool v2.1
Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

6.7.2.6

SetProfinetName method

Return type
Method name
Result
SetProfinetName
Name
Data type
strName
string
This method is used to set (or modify) the PROFINET station name for the device. For this
operation to be successful, the device port must be configured with the "Set PROFINET
device name on the device option".
ulong targetMACAddress = 0x112233445566; // 11:22:33:44:55:66
IProfinetDeviceCollection scannedDevices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (retVal.Succeeded)
{
//---------------------------------------------------------
// Search for the device at that MAC, and Set PROFINET Name
//---------------------------------------------------------
IProfinetDevice dev = scannedDevices.FindDeviceByMAC(targetMAC);
if (dev != null)
{
}
}
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
retVal = dev.SetProfinetName("new name");
SIMATIC Automation Tool API for .NET framework
Parameters
Parameter type
In
6.7 The IProfinetDevice interface
Description
New name for the PROFINET station
93

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents