HRESULTAdsErr_TO_TcEventEntry

HRESULTAdsErr_TO_TcEventEntry 1:

This function converts a standard ADS error (HRESULT) into a TcEventEntry.

Syntax

Definition:

FUNCTION HRESULTAdsErr_TO_TcEventEntry : BOOL
VAR_INPUT
    hr           : E_HRESULTAdsErr;
    stEventEntry : REFERENCE TO TcEventEntry;
END_VAR

HRESULTAdsErr_TO_TcEventEntry 2: Inputs

Name

Type

Description

hr

E_HRESULTAdsErr

Error code to be converted.

stEventEntry 

REFERENCE TO TcEventEntry

Outputs the resulting event definition.

HRESULTAdsErr_TO_TcEventEntry 3: Return value

Name

Type

Description

HRESULTAdsErr_TO_TcEventEntry

BOOL

Returns TRUE if the conversion was carried out successfully.

The call fails if the facility code in the specified HRESULT is unknown.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022.20

PC or CX (x64, x86, ARM)

Tc3_EventLogger