EasyManuals Logo

Siemens SIMATIC S7 User Guide

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

Table of Contents

Other manuals for Siemens SIMATIC S7

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens SIMATIC S7 and is the answer not in the manual?

Siemens SIMATIC S7 Specifications

General IconGeneral
BrandSiemens
ModelSIMATIC S7
CategoryController
LanguageEnglish

Related product manuals