SIMATIC Automation Tool API for .NET framework
6.7 The IProfinetDevice interface
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
93
New name for the PROFINET station
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)
{
retVal = dev.SetProfinetName("new name");
}
}