EasyManua.ls Logo

Siemens SIMATIC S7 - Finddevicebymac 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.6 The IProfinetDeviceCollection class
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
81
6.6.3.2
FindDeviceByMAC method
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.
Return type
Method name
IProfinetDevice
FindDeviceByMAC
Parameters
Name
Data type
Parameter type
Description
mac
ulong
In
The MAC address to search for
macString
string
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!
}

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals