hit counter script

The Icpu Interface; Identifying Cpu Devices In An Iprofinetdevicecollection - Siemens SIMATIC S7 User Manual

Simatic automation tool v2.1
Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

6.9

The ICPU interface

6.9.1

Identifying CPU devices in an IProfinetDeviceCollection

As discussed earlier, the
IProfinetDeviceCollection
the industrial network. These devices may include CPUs and decentralized I/O stations.
The
categories of devices. However, there are properties and methods that are specific to a CPU
device. These properties and methods are accessible using the
To determine if a given
cast it to an
properties/methods on the
IProfinetDeviceCollection scannedDevices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out scannedDevices);
if (retVal.Succeeded)
{
foreach (IProfinetDevice dev in scannedDevices)
{
}
}
Note
The
supported on
properties/methods that are unique to the
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
ScanNetworkDevices
. This collection contains an item for every accessible device on
interface provides properties and methods that are applicable to both
IProfinetDevice
IProfinetDevice
. If this cast is successful, then the network device is a CPU, and the
ICPU
ICPU
ICPU devAsCpu = dev as ICPU;
if (devAsCpu != null)
{
//--------------------------------------------
// The device is a CPU.
// Use the ICPU interface to interact with it.
//--------------------------------------------
}
interface inherits from
ICPU
IProfinetDevice
SIMATIC Automation Tool API for .NET framework
method is called to generate an
interface actually represents a CPU device, simply
interface can be used. The following example illustrates this.
. Therefore all the properties and methods
IProfinetDevice
are also supported on
ICPU
interface.
ICPU
6.9 The ICPU interface
interface.
ICPU
. This topic only provides details for
99

Advertisement

Table of Contents
loading

Table of Contents