SIMATIC Automation Tool API for .NET framework
6.6 The IProfinetDeviceCollection class
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
81
The FindDeviceByMAC method can search for a device with a specific MAC address.
Two versions of this method are provided, one allows the MAC address to be represented as
a string, and the other accepts the MAC address as an unsigned long integer value.
The MAC address to search for
In The MAC address to search for in string
format "xx:xx:xx:xx:xx:xx"
ulong targetMAC = 0x112233445566; // equivalent to string "11:22:33:44:55:66"
retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (!retVal.Succeeded)
return;
IProfinetDevice dev = scannedDevices.FindDeviceByMAC(targetMAC);
if (dev != null)
{
// Found it!
}