TcEventLogger

This class represents the connection to a TwinCAT 3 Eventlogger.

Syntax

public class: ITcEventLogger2, _ITcEventLoggerEvents

Constructor

Initializes a new instance of the TcEventLogger class.

public TcEventLoggerClass();

Call:

TcEventLogger logger : new TcEventLogger();

TcEventLogger 1: Interfaces

Name

Description

ITcEventLogger2

Interface for sending commands to the EventLogger.

_ITcEventLoggerEvents

This interface provides the messages for occurring events.

TcEventLogger 2: Methods

Name

Modifier

Return type

Definition location

Description

ClearAllAlarms

public virtual

void

ITcEventLogger/ITcEventLogger2

Calls Clear() for all alarms in the "Raised" state.

ClearLoggedEvents

public virtual

void

ITcEventLogger/ITcEventLogger2

Calls Clear() for all events that are currently in the "Raised" state.

ConfirmAllAlarms

public virtual

void

ITcEventLogger/ITcEventLogger2

Calls Confirm() for all alarms with the confirmation state "WaitForConfirmation".

Connect

public virtual

void

ITcEventLogger/ITcEventLogger2

Connects to the EventLogger of the TwinCAT system on a given system.

Disconnect

public virtual

void

ITcEventLogger/ITcEventLogger2

Cancels the connection to an EventLogger of the TwinCAT system.

GetEventClassName

public virtual

string

ITcEventLogger/ITcEventLogger2

Returns the class name for an event.

GetLoggedEvents

public virtual

TcEventLoggerAdsProxyLib.TcLoggedEventCollection

ITcEventLogger/ITcEventLogger2

Queries the events located in the cache.

ITcEventLogger2_SendTcMessage

public virtual

void

ITcEventLogger2

Sends a message.

TcEventLogger 3: events

Name

Return type

Definition location

Description

AlarmCleared

_ITcEventLoggerEvents_AlarmClearedEventHandler

_ITcEventLoggerEvents

Called if an alarm changes to the "Not Raised" state.

AlarmConfirmed

_ITcEventLoggerEvents_AlarmConfirmedEventHandler

_ITcEventLoggerEvents

Called if an alarm changes to the "Confirmed" state.

AlarmRaised

_ITcEventLoggerEvents_AlarmRaisedEventHandler

_ITcEventLoggerEvents

Called if an alarm changes to the "Raised" state.

MessageSent

_ITcEventLoggerEvents_MessageSentEventHandler

_ITcEventLoggerEvents

Called when a message has been sent.

TcEventLogger 4: Properties

Name

Modifier

Type

Access

Definition location

Description

ActiveAlarms

public virtual

TcAlarmCollection

get

ITcEventLogger/ITcEventLogger2

Returns a collection with all currently active alarms.

IsConnected

public virtual

bool

get

ITcEventLogger/ITcEventLogger2

Represents the connection that was established by means of Connect. Should be checked regularly.