FB_TcAlarm

FB_TcAlarm 1:

This function block represents an alarm of the TwinCAT 3 EventLogger.

Syntax

Definition:

FUNCTION_BLOCK FB_TcAlarm EXTENDS FB_TcEventBase

Inheritance hierarchy

FB_TcEventBase

     FB_TcAlarm

FB_TcAlarm 2: Methods

Name

Definition location

Description

EqualsTo

Inherited from FB_TcEventBase

Compares the event with another instance.

EqualsToEventClass

Inherited from FB_TcEventBase

Compares the event class of the event with another event class.

EqualsToEventEntry

Inherited from FB_TcEventBase

Compares the event class, the event ID and the severity of the event with those of another event.

EqualsToEventEntryEx

Inherited from FB_TcEventBase

Compares the event definition of the event with another event definition.

GetJsonAttribute

Inherited from FB_TcEventBase

Returns the Json attribute.

Release

Inherited from FB_TcEventBase

Releases the instance created by the EventLogger again.

RequestEventClassName

Inherited from FB_TcEventBase

Requests the name of the event class.

RequestEventText

Inherited from FB_TcEventBase

Returns the text for the event.

Clear

Local

Sets the alarm state to "Not Raised".

Confirm

Local

Confirms the alarm.

Create

Local

Creates an alarm instance in the EventLogger.

CreateEx

Local

Creates an alarm instance in the EventLogger from an event definition.

Raise

Local

Sets the alarm state to "Raised".

SetJsonAttribute

Local

Sets the Json attribute.

FB_TcAlarm 3: Properties

Name

Type

Access

Definition location

Description

eSeverity

TcEventSeverity

Get

Inherited from FB_TcEventBase

Returns the severity.

EventClass

GUID

Get

Inherited from FB_TcEventBase

Returns the GUID of the event class.

ipArguments

I_TcArguments

Get

Inherited from FB_TcEventBase

Returns the interface pointer for the arguments.

ipSourceInfo

I_TcSourceInfo

Get

Inherited from FB_TcEventBase

The SourceInfo is created internally as the default behavior. It then contains the symbol name of the function block that instances FB_TcMessage as SourceName and the object ID of the PLC instance as SourceID.

If the instance of FB_TcMessage is hidden with the attribute "hide", no symbol name can be created internally for the default behavior.

nEventId

nEventId

Get

Inherited from FB_TcEventBase

Returns the ID of the event.

stEventEntry

TcEventEntry

Get

Inherited from FB_TcEventBase

Returns the event definition.

bRaised

BOOL

Get

Local

Returns TRUE if the alarm is in the "raised" state.

bActive

BOOL

Get

Local

Returns TRUE if the alarm is in the "Raised" or "Wait For Confirmation" state.

eConfirmationState

TcEventConfirmationState

Get

Local

Returns the confirmation state.

nTimeCleared

ULINT

Get

Local

Returns the time of the Clear.

nTimeConfirmed

ULINT

Get

Local

Returns the time of the Confirm.

nTimeRaised

ULINT

Get

Local

Returns the time of the Raise.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022.20

PC or CX (x64, x86, ARM)

Tc3_EventLogger