GetDiagnostics(UINT, => SubordinateDiagnosticDetails) : GetDiagnosticsReturnCode - Manual - SIMATIC AX - SIMATIC AX hardware diagnostics. - Siemens.Simatic.S71500.Diagnostics.Hardware,library

Siemens.Simatic.S71500.Diagnostics.Hardware library

Portfolio
SIMATIC AX
Product
SIMATIC AX
Software version
6.0.1
Edition
11/2023
Language
English (original)
Package Name
@ax/simatic-1500-diagnostics-hardware

Retrieves the diagnostic information of a hardware component's subcomponents.

Parameters:

Name Type Section Description
hardwareID UINT Input Hardware identifier of the hardware component
subordinateDiagnosticDetails SubordinateDiagnosticDetails InOut Diagnostic information of the addressed hardware subcomponents.
GetDiagnosticsReturnCode Return Provides information about the execution of the instruction.

Example:

USING Siemens.Simatic.S71500.Diagnostics.Hardware;

PROGRAM DiagnosticsProgram
    VAR
        diagInfo : SubordinateDiagnosticDetails;
        deviceAddress : UINT := UINT#269;
    END_VAR

    // Retrieve device information
    IF GetDiagnostics(deviceAddress, diagInfo) = GetDiagnosticsReturnCode#NoError THEN
        IF diagInfo.SubordinateState <> ComponentState#Good THEN
            ;// A subcomponent of the device with address '269' has a problem
        ELSE
            ;// All subcomponents of the device with address '269' are working fine
        END_IF;
    END_IF;
END_PROGRAM