SIMATIC Automation Tool API for .NET framework
6.5 The Network class
SIMATIC Automation Tool V2.1 user guide
76 Manual, V2.1.1 07/2016, A5E33042676-AC
ScanNetworkDevices method
IProfinetDeviceCollection
Out A collection containing an IProfinetDe-
vice
element for each accessible device
on the industrial network.
Once a network interface is selected, it is possible to query for the devices on the industrial
network. The
ScanNetworkDevices method outputs a collection of items, where each item
represents a device connected directly to the industrial Ethernet network. These devices
may include CPUs and decentralized IO stations.
The following example creates a collection of all accessible devices on the selected network
interface.
IProfinetDeviceCollection scannedDevices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (retVal.Succeeded)
{
//------------------------------------------------
// The action succeeded. Continue with operations.
//------------------------------------------------
}
This method outputs an
IProfinetDeviceCollection. This class is discussed in the next
chapter.