EasyManua.ls Logo

Siemens SIMATIC S7 - Getoperatingstate 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.9 The ICPU interface
SIMATIC Automation Tool V2.1 user guide
104 Manual, V2.1.1 07/2016, A5E33042676-AC
The DiagnosticsItem class
The GetDiagnosticsBuffer method returns a collection of DiagnosticsItem objects.
This class defines the following members:
Member name
Data type
Description
TimeStamp
System.DateTime
Time the diagnostic event was logged.
State
Byte
Ingoing/Outgoing
Description1
String
Title
Description2
String
Detail
6.9.3.5
GetOperatingState method
Return type
Method name
OperatingState
GetOperatingState
This method returns an OperatingState.
See also
OperatingState enumeration (Page 118)
Note
Unlike other methods on the
ICPU interface, GetOperatingState
does not require a legitimized
connection to the C
PU. Therefore, no password is needed.
The following example queries for the current operating state for all CPUs on the industrial
network. If any CPU is not in RUN, an error is shown.
IProfinetDeviceCollection devices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out devices);
if (retVal.Succeeded)
{
foreach (IProfinetDevice dev in devices)
{
ICPU devAsCpu = dev as ICPU;
if (devAsCpu != null)
{
if (devAsCpu.GetOperatingState() != OperatingState.Run)
{
// DisplayError!
}
}
}
}

Table of Contents

Other manuals for Siemens SIMATIC S7

Related product manuals