FB_ListenerBase2

FB_ListenerBase2 1:

The function block serves as the basic implementation of an event listener.

New messages and state changes of alarms can be recognized through the overwriting of the event-driven methods.

Syntax

Definition:

FUNCTION_BLOCK FB_ListenerBase2 IMPLEMENTS I_Listener2

FB_ListenerBase2 2: Methods

Name

Definition location

Description

Execute

Local

Must be called cyclically so that the event queue can be processed.

Subscribe

Local

Subscribes messages.

Unsubscribe

Local

Unsubscribes messages.

FB_ListenerBase2 3: Event-driven methods (callback methods)

Name

Definition location

Description

OnAlarmCleared

I_Listener2

Called when the state of an alarm changes from "Raised" to "Clear".

OnAlarmConfirmed

I_Listener2

Called when an alarm has been confirmed.

OnAlarmDisposed

I_Listener2

Called when an alarm instance has been released again.

OnAlarmRaised

I_Listener2

Called when the state of an alarm changes from "Clear" to "Raised".

OnMessageSent

I_Listener2

Called when a message has been sent.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.17

PC or CX (x64, x86, ARM)

Tc3_EventLogger (>= v3.1.27.0)