Getdiagnosticsbuffer Method - Siemens SIMATIC S7 User Manual

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

Advertisement

6.9.3.4

GetDiagnosticsBuffer method

Return type
Method name
Result
GetDiagnosticsBuffer
Name
Data type
password
EncryptedString
aDiagnosticsItems
List<DiagnosticsItem>
This method reads the current diagnostics entries from the CPU. Each entry is represented
as a
The following example searches the
address. When found, the diagnostics information is read from the CPU.
uint targetIPAddress = 0xC0A80001; // 192.168.0.1
List<DiagnosticsItem> aLogs = new List<DiagnosticsItem>();
IProfinetDeviceCollection devices = new IProfinetDeviceCollection();
Result retVal = myNetwork.ScanNetworkDevices(out devices);
if (retVal.Succeeded)
{
foreach (IProfinetDevice dev in devices)
{
}
}
SIMATIC Automation Tool V2.1 user guide
Manual, V2.1.1 07/2016, A5E33042676-AC
.
DiagnosticsItem
ICPU devAsCpu = dev as ICPU;
if ((devAsCpu != null) && (devAsCpu.IP == targetIPAddress))
{
retVal = devAsCpu.GetDiagnosticsBuffer(new EncryptedString(""),
if (retVal.Succeeded)
{
for (int idxLog = 0; idxLog < aLogs.Count; idxLog++)
{
string descr = aLogs[idxLog].Description1;
}
}
}
SIMATIC Automation Tool API for .NET framework
Parameters
Parameter type
In
Out
IProfinetDeviceCollection
out aLogs);
6.9 The ICPU interface
Description
This method opens a legitimized connec-
tion to the device. Therefore, a password
may be required.
A collection of Diagnostics Items: Each
item in the collection represents an entry
in the diagnostics butter.
for a CPU at a specific IP
103

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents