GetAlarm

GetAlarm 1:

This method returns an interface pointer to an existing instance.

Syntax

METHOD GetAlarm : HRESULT
VAR_INPUT
    eventClass   : GUID;
    nEventId     : UDINT;
    ipSourceInfo : I_TcSourceInfo := 0;
    fbAlarm      : REFERENCE TO FB_TcAlarm;
END_VAR

GetAlarm 2: Inputs

Name

Type

Description

eventClass

GUID

GUID of the event class.

nEventId

UDINT

ID of the event

ipSourceInfo

I_TcSourceInfo

Pointer to an ITcSourceInfo interface.

fbAlarm

REFERENCE TO FB_TcAlarm

Pointer to an alarm.

GetAlarm 3: Return value

Name

Type

Description

GetAlarm

HRESULT

Returns ADS_E_NOTFOUND if no instance was found.

Returns S_OK if the method call was successful, otherwise an HRESULT as the error code.