EasyManua.ls Logo

Siemens SIMATIC S7 - Setprofinetname Method

Siemens SIMATIC S7
134 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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
6.7.2.6
SetProfinetName method
Return type
Method name
Result
SetProfinetName
Parameters
Name
Data type
Parameter type
Description
strName
string
In
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");
}
}

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals