manual twincat 3 | plc library tc3...
TRANSCRIPT
-
Manual | EN
TE1000TwinCAT 3 | PLC Library Tc3_EventLogger
11/11/2020 | Version: 1.2
-
Table of contents
TE1000 3Version: 1.2
Table of contents1 Foreword .................................................................................................................................................... 7
1.1 Notes on the documentation.............................................................................................................. 71.2 Safety instructions ............................................................................................................................. 8
2 Overview..................................................................................................................................................... 9
3 Functions and function blocks............................................................................................................... 103.1 Asynchronous text requests ............................................................................................................ 10
3.1.1 FB_AsyncStrResult.......................................................................................................... 103.1.2 FB_RequestEventClassName ......................................................................................... 113.1.3 FB_RequestEventText..................................................................................................... 133.1.4 F_GetEventClassName ................................................................................................... 153.1.5 F_GetEventText............................................................................................................... 16
3.2 EventEntry conversion..................................................................................................................... 173.2.1 AdsErr_TO_TcEventEntry ............................................................................................... 173.2.2 HRESULTAdsErr_TO_TcEventEntry .............................................................................. 173.2.3 TcEventEntry_TO_AdsErr ............................................................................................... 183.2.4 TcEventEntry_TO_HRESULTAdsErr .............................................................................. 19
3.3 FB_ListenerBase2 ........................................................................................................................... 193.3.1 Execute............................................................................................................................ 203.3.2 OnAlarmCleared .............................................................................................................. 203.3.3 OnAlarmConfirmed .......................................................................................................... 213.3.4 OnAlarmDisposed............................................................................................................ 213.3.5 OnAlarmRaised ............................................................................................................... 223.3.6 OnMessageSent .............................................................................................................. 223.3.7 Subscribe......................................................................................................................... 223.3.8 Unsubscribe..................................................................................................................... 23
3.4 FB_TcAlarm..................................................................................................................................... 233.4.1 Clear ................................................................................................................................ 253.4.2 Confirm ............................................................................................................................ 263.4.3 Create .............................................................................................................................. 273.4.4 CreateEx.......................................................................................................................... 273.4.5 Raise................................................................................................................................ 283.4.6 SetJsonAttribute .............................................................................................................. 29
3.5 FB_TcArguments............................................................................................................................. 293.5.1 IsEmpty............................................................................................................................ 31
3.6 FB_TcEvent ..................................................................................................................................... 313.7 FB_TcEventBase............................................................................................................................. 33
3.7.1 EqualsTo.......................................................................................................................... 343.7.2 EqualsToEventClass ....................................................................................................... 353.7.3 EqualsToEventEntry ........................................................................................................ 353.7.4 EqualsToEventEntryEx.................................................................................................... 363.7.5 GetJsonAttribute .............................................................................................................. 363.7.6 Release............................................................................................................................ 373.7.7 RequestEventClassName................................................................................................ 373.7.8 RequestEventText ........................................................................................................... 38
-
Table of contents
TE10004 Version: 1.2
3.7.9 ipArguments..................................................................................................................... 393.7.10 ipSourceInfo..................................................................................................................... 39
3.8 FB_TcEventLogger.......................................................................................................................... 393.8.1 ClearAllAlarms ................................................................................................................. 393.8.2 ConfirmAllAlarms ............................................................................................................. 403.8.3 GetAlarm.......................................................................................................................... 413.8.4 GetAlarmEx ..................................................................................................................... 413.8.5 IsAlarmRaised ................................................................................................................. 423.8.6 IsAlarmRaisedEx ............................................................................................................. 423.8.7 SendMessage.................................................................................................................. 433.8.8 SendMessageEx.............................................................................................................. 44
3.9 FB_TcMessage ............................................................................................................................... 443.9.1 Create .............................................................................................................................. 463.9.2 CreateEx.......................................................................................................................... 473.9.3 SetJsonAttribute .............................................................................................................. 47
3.10 FB_TcSourceInfo............................................................................................................................. 483.10.1 Clear ................................................................................................................................ 493.10.2 ExtendName .................................................................................................................... 493.10.3 ResetToDefault................................................................................................................ 50
4 Interfaces.................................................................................................................................................. 514.1 I_TcArguments ................................................................................................................................ 51
4.1.1 AddBlob ........................................................................................................................... 514.1.2 AddBool ........................................................................................................................... 524.1.3 AddByte ........................................................................................................................... 524.1.4 AddDint ............................................................................................................................ 534.1.5 AddDWord ....................................................................................................................... 534.1.6 AddEventReferencId........................................................................................................ 544.1.7 AddEventReferenceIdGuid .............................................................................................. 544.1.8 AddInt .............................................................................................................................. 554.1.9 AddLInt ............................................................................................................................ 554.1.10 AddLReal ......................................................................................................................... 564.1.11 AddReal ........................................................................................................................... 564.1.12 AddSInt ............................................................................................................................ 564.1.13 AddString ......................................................................................................................... 574.1.14 AddUDint ......................................................................................................................... 574.1.15 AddUInt............................................................................................................................ 584.1.16 AddULInt.......................................................................................................................... 584.1.17 AddUSInt ......................................................................................................................... 594.1.18 AddWord.......................................................................................................................... 594.1.19 AddWString...................................................................................................................... 604.1.20 Clear ................................................................................................................................ 60
4.2 I_TcEventBase ................................................................................................................................ 604.2.1 EqualsTo.......................................................................................................................... 614.2.2 EqualsToEventClass ....................................................................................................... 624.2.3 EqualsToEventEntry ........................................................................................................ 624.2.4 EqualsToEventEntryEx.................................................................................................... 63
-
Table of contents
TE1000 5Version: 1.2
4.2.5 GetJsonAttribute .............................................................................................................. 634.2.6 RequestEventClassName................................................................................................ 644.2.7 RequestEventText ........................................................................................................... 65
4.3 I_TcMessage ................................................................................................................................... 654.3.1 Send ................................................................................................................................ 66
4.4 I_TcSourceInfo ................................................................................................................................ 664.4.1 EqualsTo.......................................................................................................................... 67
5 Data types ................................................................................................................................................ 685.1 TcEventEntry ................................................................................................................................... 685.2 TcEventSeverity .............................................................................................................................. 685.3 TcEventConfirmationState............................................................................................................... 68
6 Global lists ............................................................................................................................................... 706.1 Global_Constants ............................................................................................................................ 706.2 GVL ................................................................................................................................................. 706.3 Parameter list .................................................................................................................................. 706.4 Global_Version ................................................................................................................................ 70
7 Samples.................................................................................................................................................... 727.1 Tutorial............................................................................................................................................. 727.2 Example ResultMessage................................................................................................................. 747.3 Example Listener ............................................................................................................................. 74
-
Table of contents
TE10006 Version: 1.2
-
Foreword
TE1000 7Version: 1.2
1 Foreword
1.1 Notes on the documentationThis description is only intended for the use of trained specialists in control and automation engineering whoare familiar with applicable national standards.It is essential that the documentation and the following notes and explanations are followed when installingand commissioning the components. It is the duty of the technical personnel to use the documentation published at the respective time of eachinstallation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all therequirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly underdevelopment.We reserve the right to revise and change the documentation at any time and without prior announcement.No claims for the modification of products that have already been supplied may be made on the basis of thedata, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®,TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff AutomationGmbH.Other designations used in this publication may be trademarks whose use by third parties for their ownpurposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications andpatents:EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,Germany
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany.The reproduction, distribution and utilization of this document as well as the communication of its contents toothers without express authorization are prohibited.Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of apatent, utility model or design.
-
Foreword
TE10008 Version: 1.2
1.2 Safety instructions
Safety regulations
Please note the following safety instructions and explanations!Product-specific safety instructions can be found on following pages or in the areas mounting, wiring,commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for theapplication. Modifications to hardware or software configurations other than those described in thedocumentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who arefamiliar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. Thesafety instructions must be read carefully and followed without fail!
DANGERSerious risk of injury!Failure to follow the safety instructions associated with this symbol directly endangers the life and health ofpersons.
WARNINGRisk of injury!Failure to follow the safety instructions associated with this symbol endangers the life and health of per-sons.
CAUTIONPersonal injuries!Failure to follow the safety instructions associated with this symbol can lead to injuries to persons.
NOTEDamage to the environment or devicesFailure to follow the instructions associated with this symbol can lead to damage to the environment orequipment.
Tip or pointerThis symbol indicates information that contributes to better understanding.
-
Overview
TE1000 9Version: 1.2
2 OverviewThe PLC library contains functions and function blocks for using the TwinCAT 3 EventLogger.
See also: Dokumentation TwinCAT 3 EventLogger
Function blocks for using the TC3 EventLogger
FB_ListenerBase2 [} 19] Basic implementation of an event listener.
FB_TcAlarm [} 23] Represents an alarm of the TwinCAT 3 EventLogger.
FB_TcArguments [} 29] Defines arguments of an event.
FB_TcEventLogger [} 39] Represents the TwinCAT 3 EventLogger itself.
FB_TcMessage [} 44] Represents a message from the TwinCAT 3 EventLogger.
FB_TcSourceInfo [} 48] Defines the source information of an event.
Asynchronous text requests
F_GetEventClassName [} 15] Triggers the asynchronous request for the name of an eventclass.
F_GetEventText [} 16] Triggers the asynchronous request for an event text.
FB_AsyncStrResult [} 10] Enables the asynchronous request for a text.
FB_RequestEventClassName [} 11] Enables the asynchronous request for the name of an eventclass.
FB_RequestEventText [} 13] Enables the asynchronous request for an event text in thedesired language.
EventEntry conversion
AdsErr_TO_TcEventEntry [} 17] Converts a standard ADS error into a TcEventEntry.
HRESULTAdsErr_TO_TcEventEntry [} 17] Converts a standard ADS error (HRESULT) into aTcEventEntry.
TcEventEntry_TO_AdsErr [} 18] Converts a TcEventEntry into a standard ADS error.
TcEventEntry_TO_HRESULTAdsErr [} 19] Converts a TcEventEntry into a standard ADS error(HRESULT).
https://infosys.beckhoff.de/content/1033/tc3_eventlogger/index.html?id=4681858500816945042
-
Functions and function blocks
TE100010 Version: 1.2
3 Functions and function blocks
3.1 Asynchronous text requests
3.1.1 FB_AsyncStrResult
This function block enables the asynchronous request for a text.
Syntax
Definition:FUNCTION_BLOCK FB_AsyncStrResult
Methods
Name DescriptionGetString [} 10] As soon as bBusy is FALSE and provided no error has occurred (bError =
FALSE), the requested text can be fetched with this method.
Properties
Name Type Access DescriptionbBusy BOOL Get TRUE as long as the processing
is not yet completed.bError BOOL Get TRUE when an error occurs.hrErrorCode HRESULT Get Outputs the error information if
bError is TRUE.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.1.1.1 GetString
As soon as bBusy is FALSE and provided no error has occurred (bError = FALSE), the requested text canbe fetched with this method.
SyntaxMETHOD GetString : BOOLVAR_INPUT sResult : REFERENCE TO STRING; nResult : UDINT;END_VAR
-
Functions and function blocks
TE1000 11Version: 1.2
Inputs
Name Type DescriptionsResult REFERENCE TO STRING Buffer variable for the requested textnResult UDINT Buffer size in bytes
Return value
Name Type DescriptionGetString BOOL Returns TRUE if the text could be assigned.
Returns FALSE if the text could not be completely assignedbecause the specified buffer variable is too small.
Example
The method may only be called if bBusy = FALSE and bError = FALSE signal that text is available.IF NOT fb.bBusy AND NOT fb.bError THEN bGetStringSuccess := fb.GetString(sText, SIZEOF(sText));END_IF
3.1.2 FB_RequestEventClassName
This function block enables the asynchronous request for the name of an event class.
Syntax
Definition:FUNCTION_BLOCK FB_RequestEventClassName
Methods
Name DescriptionGetString [} 12] As soon as bBusy is FALSE and provided no error has occurred (bError =
FALSE), the requested text can be fetched with this method.Request [} 12] Calling this method triggers the asynchronous text request.
Properties
Name Type Access DescriptionbBusy BOOL Get TRUE as long as the processing
is not yet completed.bError BOOL Get TRUE when an error occurs.hrErrorCode HRESULT Get Outputs the error information if
bError is TRUE.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
-
Functions and function blocks
TE100012 Version: 1.2
3.1.2.1 GetString
As soon as bBusy is FALSE and provided no error has occurred (bError = FALSE), the requested text canbe fetched with this method.
SyntaxMETHOD GetString : BOOLVAR_INPUT sResult : REFERENCE TO STRING; nResult : UDINT;END_VAR
Inputs
Name Type DescriptionsResult REFERENCE TO STRING Buffer variable for the requested textnResult UDINT Buffer size in bytes
Return value
Name Type DescriptionGetString BOOL Returns TRUE if the text could be assigned.
Returns FALSE if the text could not be completely assignedbecause the specified buffer variable is too small.
Example
The method may only be called if bBusy = FALSE and bError = FALSE signal that text is available.IF NOT fb.bBusy AND NOT fb.bError THEN bGetStringSuccess := fb.GetString(sText, SIZEOF(sText));END_IF
3.1.2.2 Request
Calling this method triggers the asynchronous text request.
SyntaxMETHOD Request : HRESULTVAR_INPUT eventClass : GUID; nLangId : DINT;END_VAR
-
Functions and function blocks
TE1000 13Version: 1.2
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031
Return value
Name Type DescriptionRequest HRESULT Returns possible error information.
3.1.3 FB_RequestEventText
This function block enables the asynchronous request for an event text in the desired language.
Syntax
Definition:FUNCTION_BLOCK FB_RequestEventText
Methods
Name DescriptionGetString [} 13] As soon as bBusy is FALSE and provided no error has occurred (bError =
FALSE), the requested text can be fetched with this method.Request [} 14] Calling this method triggers the asynchronous text request.
Properties
Name Type Access DescriptionbBusy BOOL Get TRUE as long as the processing
is not yet completed.bError BOOL Get TRUE when an error occurs.hrErrorCode HRESULT Get Outputs the error information if
bError is TRUE.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.1.3.1 GetString
-
Functions and function blocks
TE100014 Version: 1.2
As soon as bBusy is FALSE and provided no error has occurred (bError = FALSE), the requested text canbe fetched with this method.
SyntaxMETHOD GetString : BOOLVAR_INPUT sResult : REFERENCE TO STRING; nResult : UDINT;END_VAR
Inputs
Name Type DescriptionsResult REFERENCE TO STRING Buffer variable for the requested textnResult UDINT Buffer size in bytes
Return value
Name Type DescriptionGetString BOOL Returns TRUE if the text could be assigned.
Returns FALSE if the text could not be completely assignedbecause the specified buffer variable is too small.
Example
The method may only be called if bBusy = FALSE and bError = FALSE signal that text is available.IF NOT fb.bBusy AND NOT fb.bError THEN bGetStringSuccess := fb.GetString(sText, SIZEOF(sText));END_IF
3.1.3.2 Request
Calling this method triggers the asynchronous text request.
SyntaxMETHOD Request : BOOLVAR_INPUT eventClass : GUID; nEventId : UDINT; nLangId : DINT; ipArgs : I_TcArguments;END_VAR
-
Functions and function blocks
TE1000 15Version: 1.2
Inputs
Name Type DescriptioneventClass GUID Specifies the event class.nEventId UDINT ID of the event.nLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031…
ipArgs I_TcArguments [} 51] Optional specification of arguments.
Return value
Name Type DescriptionRequest HRESULT Returns possible error information.
3.1.4 F_GetEventClassName
The function triggers the asynchronous request for the name of an event class.
Syntax
Definition:FUNCTION F_GetEventClassName : HRESULTVAR_INPUT nLangId : DINT; fbEventBase : REFERENCE TO FB_TcEventBase;END_VARVAR_IN_OUT fbResult : FB_AsyncStrResult;END_VAR
Inputs
Name Type DescriptionnLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031…
fbEventBase REFERENCE TOFB_TcEventBase [} 33]
Specification of an event/alarm/message object.
/ Inputs/outputs
Name Type DescriptionfbResult FB_AsyncStrResult [} 10] Specification of a function block instance in order to track an
asynchronous text request.
-
Functions and function blocks
TE100016 Version: 1.2
Return value
Name Type DescriptionF_GetEventClassName HRESULT Returns possible error information.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.1.5 F_GetEventText
The function triggers the asynchronous request for an event text.
Syntax
Definition:FUNCTION F_GetEventText : HRESULTVAR_INPUT nLangId : DINT; fbEventBase : REFERENCE TO FB_TcEventBase;END_VARVAR_IN_OUT fbResult : FB_AsyncStrResult;END_VAR
Inputs
Name Type DescriptionnLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031…
fbEventBase REFERENCE TOFB_TcEventBase [} 33]
Specification of an event/alarm/message object.
/ Inputs/outputs
Name Type DescriptionfbResult FB_AsyncStrResult [} 10] Specification of a function block instance in order to track an
asynchronous text request.
Return value
Name Type DescriptionF_GetEventText HRESULT Returns possible error information.
-
Functions and function blocks
TE1000 17Version: 1.2
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.2 EventEntry conversion
3.2.1 AdsErr_TO_TcEventEntry
This function converts a standard ADS error into a TcEventEntry.
Syntax
Definition:FUNCTION AdsErr_TO_TcEventEntry : BOOLVAR_INPUT nErrorId : UDINT; stEventEntry : REFERENCE TO TcEventEntry;END_VAR
Inputs
Name Type DescriptionnErrorId UDINT Error code to be converted.stEventEntry REFERENCE TO TcEventEntry [} 68] Outputs the resulting event definition.
Return value
Name Type DescriptionAdsErr_TO_TcEventEntry BOOL Returns TRUE if the conversion was
carried out successfully.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.2.2 HRESULTAdsErr_TO_TcEventEntry
This function converts a standard ADS error (HRESULT) into a TcEventEntry.
Syntax
Definition:
-
Functions and function blocks
TE100018 Version: 1.2
FUNCTION HRESULTAdsErr_TO_TcEventEntry : BOOLVAR_INPUT hr : E_HRESULTAdsErr; stEventEntry : REFERENCE TO TcEventEntry;END_VAR
Inputs
Name Type Descriptionhr E_HRESULTAdsErr Error code to be converted.stEventEntry REFERENCE TO TcEventEntry
[} 68]Outputs the resulting event definition.
Return value
Name Type DescriptionHRESULTAdsErr_TO_TcEventEntry BOOL Returns TRUE if the conversion was carried out
successfully.The call fails if the facility code in the specifiedHRESULT is unknown.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.2.3 TcEventEntry_TO_AdsErr
This function converts a TcEventEntry into a standard ADS error.
Syntax
Definition:FUNCTION TcEventEntry_TO_AdsErr : BOOLVAR_INPUT stEventEntry : TcEventEntry; nErrorId : REFERENCE TO UDINT;END_VAR
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition to be converted.nErrorId REFERENCE TO UDINT Outputs the resulting error code.
Return value
Name Type DescriptionTcEventEntry_TO_AdsErr BOOL Returns TRUE if the conversion was carried out successfully and
FALSE if the event class is unknown.
-
Functions and function blocks
TE1000 19Version: 1.2
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.2.4 TcEventEntry_TO_HRESULTAdsErr
This function converts a TcEventEntry into a standard ADS error (HRESULT).
Syntax
Definition:FUNCTION TcEventEntry_TO_HRESULTAdsErr : BOOLVAR_INPUT stEventEntry : TcEventEntry; hr : REFERENCE TO E_HRESULTAdsErr;END_VAR
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition to be converted.hr REFERENCE TO
E_HRESULTAdsErrOutputs the resulting error code.
Return value
Name Type DescriptionTcEventEntry_TO_HRESULTAdsErr BOOL Returns TRUE if the conversion was carried out
successfully and FALSE if the event class isunknown.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.3 FB_ListenerBase2
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-drivenmethods.
Syntax
Definition:FUNCTION_BLOCK FB_ListenerBase2 IMPLEMENTS I_Listener2
-
Functions and function blocks
TE100020 Version: 1.2
Methods
Name Definition loca-tion
Description
Execute [} 20] Local Must be called cyclically so that the event queue can beprocessed.
Subscribe [} 22] Local Subscribes messages.
Unsubscribe [} 23] Local Unsubscribes messages.
Event-driven methods (callback methods)
Name Definition loca-tion
Description
OnAlarmCleared[} 20]
I_Listener2 Called when the state of an alarm changes from "Raised" to"Clear".
OnAlarmConfirmed[} 21]
I_Listener2 Called when an alarm has been confirmed.
OnAlarmDisposed[} 21]
I_Listener2 Called when an alarm instance has been released again.
OnAlarmRaised [} 22] I_Listener2 Called when the state of an alarm changes from "Clear" to"Raised".
OnMessageSent[} 22]
I_Listener2 Called when a message has been sent.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4024.0 PC or CX (x64, x86, ARM) Tc3_EventLogger (>= v3.1.21.0)
3.3.1 Execute
This method must be called cyclically so that the event queue can be processed.
SyntaxMETHOD Execute : HRESULT
Return value
Name Type DescriptionExecute HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.3.2 OnAlarmCleared
This method is called if the state of an alarm changes from Raised to Clear.
-
Functions and function blocks
TE1000 21Version: 1.2
SyntaxMETHOD OnAlarmCleared : HRESULTVAR_INPUT fbEvent : REFEENCE TO FB_TcEvent;END_VAR
If the implementation of the callback method returns a return code S_OK, further callback calls will bepaused until the next execution.
Inputs
Name Type DescriptionfbEvent REFERENCE TO FB_TcEvent [} 31] Reference to the alarm that has occurred.
3.3.3 OnAlarmConfirmed
This method is called when an alarm has been confirmed.
SyntaxMETHOD OnAlarmConfirmed : HRESULTVAR_INPUT fbEvent : REFEENCE TO FB_TcEvent;END_VAR
If the implementation of the callback method returns a return code S_OK, further callback calls will bepaused until the next execution.
Inputs
Name Type DescriptionfbEvent REFERENCE TO FB_TcEvent [} 31] Reference to the alarm that has occurred.
3.3.4 OnAlarmDisposed
This method is called when an alarm instance has been released again.
SyntaxMETHOD OnAlarmConfirmed : HRESULTVAR_INPUT fbEvent : REFEENCE TO FB_TcEvent;END_VAR
If the implementation of the callback method returns a return code S_OK, further callback calls will bepaused until the next execution.
Inputs
Name Type DescriptionfbEvent REFERENCE TO FB_TcEvent [} 31] Reference to the alarm that has occurred.
-
Functions and function blocks
TE100022 Version: 1.2
3.3.5 OnAlarmRaised
This method is called if the state of an alarm changes from Clear to Raised.
SyntaxMETHOD OnAlarmRaised : HRESULTVAR_INPUT fbEvent : REFERENCE TO FB_TcEvent;END_VAR
If the implementation of the callback method returns a return code S_OK, further callback calls will bepaused until the next execution.
Inputs
Name Type DescriptionfbEvent REFERENCE TO FB_TcEvent [} 31] Reference to the alarm that has occurred.
3.3.6 OnMessageSent
This method is called when a message has been sent.
SyntaxMETHOD OnMessageSent : HRESULTVAR_INPUT fbEvent : REFEENCE TO FB_TcEvent;END_VAR
If the implementation of the callback method returns a return code S_OK, further callback calls will bepaused until the next execution.
Inputs
Name Type DescriptionfbEvent REFERENCE TO FB_TcEvent [} 31] Reference to the event that has occurred.
3.3.7 Subscribe
The listener is subscribed for messages with this method.
SyntaxMETHOD Subscribe : HRESULTVAR_INPUT ipMessageFilterConfig : POINTER TO ITcEventFilterConfig; ipAlarmFilterConfig : POINTER TO ITcEventFilterConfig;END_VAR
-
Functions and function blocks
TE1000 23Version: 1.2
Inputs
Name Type DescriptionipMessageFilterConfig POINTER TO ITcEventFilterConfig Pointer to ITcEventFilterConfig if
a filter is to be activated.ipAlarmFilterConfig POINTER TO ITcEventFilterConfig Pointer to ITcEventFilterConfig if
a filter is to be activated.
Return value
Name Type DescriptionSubscribe HRESULT Returns S_OK if the method call was successful.
Returns ADS_E_EXISTS if the listener is already subscribed.Otherwise returns HRESULT as the error code.
3.3.8 Unsubscribe
The listener is unsubcribed with this method.
SyntaxMETHOD Unsubscribe : HRESULT
Return value
Name Type DescriptionUnsubscribe HRESULT Returns S_OK if the method call was successful.
Returns ADS_E_NOTFOUND if the listener was not subscribed.Otherwise returns HRESULT as the error code.
3.4 FB_TcAlarm
The function block represents an alarm of the TwinCAT 3 EventLogger.
Syntax
Definition:FUNCTION_BLOCK FB_TcAlarm EXTENDS FB_TcEventBase
Inheritance hierarchy
FB_TcEventBase [} 33]
FB_TcAlarm
-
Functions and function blocks
TE100024 Version: 1.2
Methods
Name Definition location DescriptionEqualsTo [} 34] Inherited from FB_TcEventBase
[} 33]Compares the event with another instance.
EqualsToEventClass [} 35] Inherited from FB_TcEventBase[} 33]
Compares the event class of the event withanother event class.
EqualsToEventEntry [} 35] Inherited from FB_TcEventBase[} 33]
Compares the event class, the event ID andthe severity of the event with those of anotherevent.
EqualsToEventEntryEx [} 36] Inherited from FB_TcEventBase[} 33]
Compares the event definition of the eventwith another event definition.
GetJsonAttribute [} 36] Inherited from FB_TcEventBase[} 33]
Returns the Json attribute.
Release [} 37] Inherited from FB_TcEventBase[} 33]
Releases the instance created by theEventLogger again.
RequestEventClassName[} 37]
Inherited from FB_TcEventBase[} 33]
Requests the name of the event class.
RequestEventText [} 38] Inherited from FB_TcEventBase[} 33]
Returns the text for the event.
Clear [} 25] Local Sets the alarm state to "Not Raised".
Confirm [} 26] Local Confirms the alarm.
Create [} 27] Local Creates an alarm instance in theEventLogger.
CreateEx [} 27] Local Creates an alarm instance in the EventLoggerfrom an event definition.
Raise [} 28] Local Sets the alarm state to "Raised".
SetJsonAttribute [} 29] Local Sets the Json attribute.
-
Functions and function blocks
TE1000 25Version: 1.2
Properties
Name Type Access Definition location DescriptioneSeverity TcEventSeverity
[} 68]Get Inherited from
FB_TcEventBase[} 33]
Returns the severity.
EventClass GUID Get Inherited fromFB_TcEventBase[} 33]
Returns the GUID of the eventclass.
ipArguments [} 39] I_TcArguments[} 51]
Get Inherited fromFB_TcEventBase[} 33]
Returns the interface pointer forthe arguments.
ipSourceInfo [} 39] I_TcSourceInfo[} 66]
Get Inherited fromFB_TcEventBase[} 33]
The SourceInfo is createdinternally as the defaultbehavior. It then contains thesymbol name of the functionblock that instancesFB_TcMessage asSourceName and the object IDof the PLC instance asSourceID.If the instance ofFB_TcMessage is hidden withthe attribute "hide", no symbolname can be created internallyfor the default behavior.
nEventId nEventId Get Inherited fromFB_TcEventBase[} 33]
Returns the ID of the event.
stEventEntry TcEventEntry[} 68]
Get Inherited fromFB_TcEventBase[} 33]
Returns the event definition.
bRaised BOOL Get Local Returns TRUE if the alarm is inthe raised state.
eConfirmationState TcEventConfirmationState [} 68]
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 includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.4.1 Clear
This method sets the alarm state to Not Raised.
-
Functions and function blocks
TE100026 Version: 1.2
SyntaxMETHOD Clear : HRESULTVAR_INPUT nTimeStamp : ULINT; bResetConfirmation : BOOL;END_VAR
Inputs
Name Type DescriptionnTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in 100 nanoseconds since January 1st,1601 (UTC).
bResetConfirmation BOOL If TRUE and the confirmation state is WaitForConfirmation, theconfirmation state is set to Reset.Otherwise the confirmation state is not changed.
Return value
Name Type DescriptionClear HRESULT Returns S_OK if the method call was successful.
Returns ADS_E_INVALIDSTATE if the alarm was not in theRaised state.Otherwise returns HRESULT as the error code.
3.4.2 Confirm
Sets the confirmation state of WaitingForConfirmation to Confirmed.
SyntaxMETHOD Confirm : HRESULTVAR_INPUT nTimeStamp: ULINT;END_VAR
Inputs
Name Type DescriptionnTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in 100 nanoseconds since January 1st,1601 (UTC).
Return value
Name Type DescriptionConfirm HRESULT Returns S_OK if the method call was successful.
Returns ADS_E_INVALIDSTATE if the confirmation state was notWaitConfirmation.Otherwise returns HRESULT as the error code.
-
Functions and function blocks
TE1000 27Version: 1.2
3.4.3 Create
This method creates an alarm instance in the EventLogger.
SyntaxMETHOD Create : HRESULT eventClass : GUID; nEventId : UDINT; eSeverity : TcEventSeverity; bWithConfirmation : BOOL; ipSourceInfo : I_TcSourceInfo;END_VAR
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nEventId UDINT ID of the event.eSeverity TcEventSeverity
[} 68]Severity of the event.
bWithConfirmation BOOL Defines whether the alarm requires mandatory confirmation.ipSourceInfo I_TcSourceInfo
[} 66]Interface pointer to the source information.Default source information is created if no interface pointer istransferred.
Return value
Name Type DescriptionCreate HRESULT Returns S_OK if a new alarm was successfully created.
Returns ERROR_ALREADY_EXISTS if the alarm has alreadyexisted.Otherwise returns HRESULT as the error code
3.4.4 CreateEx
This method creates an alarm instance in the EventLogger.
SyntaxMETHOD CreateEx : HRESULTVAR_INPUT stEventEntry : TcEventEntry; bWithConfirmation : BOOL; ipSourceInfo : I_TcSourceInfo;END_VAR
-
Functions and function blocks
TE100028 Version: 1.2
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition.bWithConfirmation BOOL Defines whether the alarm requires mandatory
confirmation.ipSourceInfo I_TcSourceInfo [} 66] Interface pointer to the source information.
Default source information is created if no interfacepointer is transferred.
Return value
Name Type DescriptionCreateEx HRESULT Returns S_OK if a new alarm was successfully created.
Returns ERROR_ALREADY_EXISTS if the alarm has alreadyexisted.Otherwise returns HRESULT as the error code.
3.4.5 Raise
Sets the alarm state to Raised.
If the alarm requires mandatory confirmation, the confirmation state is additionally set toWaitForConfirmation.
SyntaxMETHOD Raise : HRESULTVAR_INPUT nTimeStamp : ULINT;END_VAR
Inputs
Name Type DescriptionnTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in 100 nanoseconds since January 1st,1601 (UTC).
Return value
Name Type DescriptionRaise HRESULT Returns S_OK if the method call was successful.
Returns ADS_E_INVALIDSTATE if the alarm was already in theRaised state.Otherwise returns HRESULT as the error code
-
Functions and function blocks
TE1000 29Version: 1.2
3.4.6 SetJsonAttribute
This method sets the JSON attribute.
SyntaxMETHOD SetJsonAttribute : HRESULTVAR_IN_OUT CONSTANT sJsonAttribute : STRING;END_VAR
Inputs
Name Type DescriptionsJsonAttribute STRING JSON string
Return value
Name Type DescriptionSetJsonAttribute HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.5 FB_TcArguments
Arguments of an event can be defined with this function block. The function block therefore implements theI_TcArguments interface.
Syntax
Definition:FUNCTION_BLOCK FB_TcArguments IMPLEMENTS I_TcArguments
Interfaces
Type DescriptionI_TcArguments [} 51] Defines the argument handling.
-
Functions and function blocks
TE100030 Version: 1.2
Methods
Name Definition loca-tion
Description
AddBlob [} 51] I_TcArguments[} 51]
Adds binary data as an argument.
AddBool [} 52] I_TcArguments[} 51]
Adds an argument of the type BOOL.
AddByte [} 52] I_TcArguments[} 51]
Adds an argument of the type BYTE.
AddDint [} 53] I_TcArguments[} 51]
Adds an argument of the type DINT.
AddDWord [} 53] I_TcArguments[} 51]
Adds an argument of the type DWORD.
AddEventReferencId[} 54]
I_TcArguments[} 51]
Adds a reference to another event as an argument.
AddEventReferenceIdGuid [} 54]
I_TcArguments[} 51]
Adds a reference to another event as an argument.
AddInt [} 55] I_TcArguments[} 51]
Adds an argument of the type INT.
AddLInt [} 55] I_TcArguments[} 51]
Adds an argument of the type LINT.
AddLReal [} 56] I_TcArguments[} 51]
Adds an argument of the type LREAL.
AddReal [} 56] I_TcArguments[} 51]
Adds an argument of the type REAL.
AddSInt [} 56] I_TcArguments[} 51]
Adds an argument of the type SINT.
AddString [} 57] I_TcArguments[} 51]
Adds an argument of the type STRING.
AddUDint [} 57] I_TcArguments[} 51]
Adds an argument of the type UDINT.
AddUInt [} 58] I_TcArguments[} 51]
Adds an argument of the type INT.
AddULInt [} 58] I_TcArguments[} 51]
Adds an argument of the type ULINT.
AddUSInt [} 59] I_TcArguments[} 51]
Adds an argument of the type USINT.
AddWord [} 59] I_TcArguments[} 51]
Adds an argument of the type WORD.
AddWString [} 60] I_TcArguments[} 51]
Adds an argument of the type WSTRING.
Clear [} 60] I_TcArguments[} 51]
Removes all arguments.
IsEmpty [} 31] Local Checks whether arguments have been added.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
-
Functions and function blocks
TE1000 31Version: 1.2
3.5.1 IsEmpty
This method checks whether arguments have been added.
SyntaxMETHOD IsEmpty : BOOL
Return value
Name Type DescriptionIsEmpty BOOL Returns TRUE if no arguments have been added.
3.6 FB_TcEvent
This function block provides only read methods and read properties for an event.
Syntax
Definition:FUNCTION_BLOCK FB_TcEvent EXTENDS FB_TcEventBase IMPLEMENTS I_TcEventBase
Inheritance hierarchy
FB_TcEventBase [} 33]
FB_TcEvent
Interfaces
Type DescriptionI_TcEventBase [} 60] Basic interface that defines methods and properties of an event.
-
Functions and function blocks
TE100032 Version: 1.2
Methods
Name Definition location DescriptionEqualsTo [} 34] Inherited from FB_TcEventBase
[} 33]Compares the event with anotherinstance.
EqualsToEventClass [} 35] Inherited from FB_TcEventBase[} 33]
Compares the event class of theevent with another event class.
EqualsToEventEntry [} 35] Inherited from FB_TcEventBase[} 33]
Compares the event definition ofthe event with another eventdefinition.
EqualsToEventEntryEx [} 36] Inherited from FB_TcEventBase[} 33]
Compares the event definition ofthe event with another eventdefinition.
GetJsonAttribute [} 36] Inherited from FB_TcEventBase[} 33]
Returns the Json attribute.
Release [} 37] Inherited from FB_TcEventBase[} 33]
Releases the instance created bythe EventLogger again.
RequestEventClassName [} 37] Inherited from FB_TcEventBase[} 33]
Requests the name of the eventclass.
RequestEventText [} 38] Inherited from FB_TcEventBase[} 33]
Returns the text for the event.
Properties
Name Type Access Definition loca-tion
Description
eSeverity TcEventSeverity[} 68]
Get Inherited fromFB_TcEventBase[} 33]
Returns the severity.
EventClass GUID Get Inherited fromFB_TcEventBase[} 33]
Returns the GUID of the event class.
ipArguments[} 39]
I_TcArguments[} 51]
Get Inherited fromFB_TcEventBase[} 33]
Returns the interface pointer for thearguments.
ipSourceInfo[} 39]
I_TcSourceInfo[} 66]
Get Inherited fromFB_TcEventBase[} 33]
The SourceInfo is created internally asthe default behavior. It then contains thesymbol name of the function block thatinstances FB_TcMessage asSourceName and the object ID of thePLC instance as SourceID.If the instance of FB_TcMessage ishidden with the attribute "hide", nosymbol name can be created internallyfor the default behavior.
nEventId nEventId Get Inherited fromFB_TcEventBase[} 33]
Returns the ID of the event.
stEventEntry TcEventEntry [} 68] Get Inherited fromFB_TcEventBase[} 33]
Returns the event definition.
nTimestamp ULINT Get Local Returns the time.
-
Functions and function blocks
TE1000 33Version: 1.2
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.7 FB_TcEventBase
This function block contains the basic implementation.
Syntax
Definition:FUNCTION_BLOCK FB_TcEventBase
Methods
Name Definition location DescriptionEqualsTo [} 34] Local Compares the event with another instance.
EqualsToEventClass [} 35] Local Compares the event class of the event withanother event class.
EqualsToEventEntry [} 35] Local Compares the event definition of the event withanother event definition.
EqualsToEventEntryEx [} 36] Local Compares the event definition of the event withanother event definition.
GetJsonAttribute [} 36] Local Returns the Json attribute.
Release [} 37] Local Releases the instance created by theEventLogger again.
RequestEventClassName [} 37] Local Requests the name of the event class.
RequestEventText [} 38] Local Returns the text for the event.
-
Functions and function blocks
TE100034 Version: 1.2
Properties
Name Type Access DescriptioneSeverity TcEventSeverity [} 68] Get Returns the severity.EventClass GUID Get Returns the GUID of the
event class.ipArguments [} 39] I_TcArguments [} 51] Get Returns the interface pointer
for the arguments.ipSourceInfo [} 39] I_TcSourceInfo [} 66] Get The SourceInfo is created
internally as the defaultbehavior. It then containsthe symbol name of thefunction block that instancesFB_TcMessage asSourceName and the objectID of the PLC instance asSourceID.If the instance ofFB_TcMessage is hiddenwith the attribute "hide", nosymbol name can becreated internally for thedefault behavior.
nEventId nEventId Get Returns the ID of the eventstEventEntry TcEventEntry [} 68] Get Returns the event definition.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.7.1 EqualsTo
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsTo : BOOLVAR_INPUT ipOther : I_TcEventBase;END_VAR
Inputs
Name Type DescriptionipOther I_TcEventBase [} 60] Event to be compared
-
Functions and function blocks
TE1000 35Version: 1.2
Return value
Name Type DescriptionEqualsTo BOOL Returns TRUE if the events match.
3.7.2 EqualsToEventClass
This method carries out a comparison with another event class specified at the input.
SyntaxMETHOD EqualsToEventClass : BOOLVAR_INPUT OtherEventClass : GUIDEND_VAR
Inputs
Name Type DescriptionOtherEventClass GUID Event class to be compared.
Return value
Name Type DescriptionEqualsToEventClass BOOL Returns TRUE if the event classes match.
3.7.3 EqualsToEventEntry
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsToEventEntry : BOOLVAR_INPUT OtherEventClass : GUID; nOtherEventID : UDINT; eOtherSeverity : TcEventSeverity;END_VAR
Inputs
Name Type DescriptionOtherEventClass GUID Event class of the event to be compared.nOtherEventID UDINT Event ID of the event to be compared.eOtherSeverity TcEventSeverity [} 68] Event severity of the event to be compared.
-
Functions and function blocks
TE100036 Version: 1.2
Return value
Name Type DescriptionEqualsToEventEntry BOOL Returns TRUE if the events match.
3.7.4 EqualsToEventEntryEx
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsToEventEntryEx : BOOLVAR_INPUT stOther : TcEventEntry;END_VAR
Inputs
Name Type DescriptionstOther TcEventEntry [} 68] Event to be compared.
Return value
Name Type DescriptionEqualsToEventEntryEx BOOL Returns TRUE if the events match.
3.7.5 GetJsonAttribute
This method returns the JSON attribute.
SyntaxMETHOD GetJsonAttribute : HRESULTVAR_INPUT sJsonAttribute : REFERENCE TO STRING; nJsonAttribute : UDINT;END_VAR
Inputs
Name Type DescriptionsJsonAttribute REFERENCE TO STRING Reference to a variable of the type StringnJsonAttribute UDINT Length of the String variable
-
Functions and function blocks
TE1000 37Version: 1.2
Return value
Name Type DescriptionGetJsonAttribute HRESULT Returns S_OK if the method call was successful.
Returns ERROR_BAD_LENGTH if the length of the variable is toosmall.Otherwise HRESULT is returned as the error code.
3.7.6 Release
This method releases the instance created by the EventLogger again.
SyntaxMETHOD Release : HRESULT
Return value
Name Type DescriptionRelease HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.7.7 RequestEventClassName
This method returns the name of the event class.
SyntaxMETHOD RequestEventClassName : BOOLVAR_INPUT nLangId : DINT; sResult : REFERENCE TO STRING; nResultSize : UDINT;END_VARVAR_OUTPUT bError : BOOL; hrErrorCode : HRESULT;END_VAR
Inputs
Name Type DescriptionnLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031…
sResult REFERENCE TO STRING Reference to a variable of the type StringnResultSize UDINT Size of the String variable in bytes
-
Functions and function blocks
TE100038 Version: 1.2
Return value
Name Type DescriptionRequestEventClassName BOOL Returns TRUE as soon as the request has been terminated.
Returns FALSE if the asynchronous request is still active. Themethod must be called until the return value is TRUE.
Outputs
Name Type DescriptionbError BOOL Returns FALSE if the method call was successful. Returns TRUE if
an error has occurred.hrErrorCode HRESULT Returns S_OK if the method call was successful. An error code is
output in case of an error.
3.7.8 RequestEventText
This method returns the event text.
SyntaxMETHOD RequestEventText : BOOLVAR_INPUT nLangId : DINT; sResult : REFERENCE TO STRING; nResultSize : UDINT;END_VARVAR_OUTPUT bError : BOOL; hrErrorCode : HRESULT;END_VAR
Inputs
Name Type DescriptionnLangId DINT Specifies the language ID
English (en-US) = 1033German (de-DE) = 1031…
sResult REFERENCE TO STRING Reference to a variable of the type StringnResultSize UDINT Size of the String variable in bytes
Return value
Name Type DescriptionRequestEventText BOOL Returns TRUE as soon as the request has been terminated.
Returns FALSE if the asynchronous request is still active. Themethod must be called until the return value is TRUE.
-
Functions and function blocks
TE1000 39Version: 1.2
Outputs
Name Type DescriptionbError BOOL Returns FALSE if the method call was successful. Returns TRUE if
an error has occurred.hrErrorCode HRESULT Returns S_OK if the method call was successful. An error code is
output in case of an error.
3.7.9 ipArgumentsPROPERTY PUBLIC ipArguments : I_TcArguments
3.7.10 ipSourceInfoPROPERTY ipSourceInfo : I_TcSourceInfo
3.8 FB_TcEventLogger
This function block represents the TwinCAT 3 EventLogger itself.
Syntax
Definition:FUNCTION_BLOCK FB_TcEventLogger
Methods
Name DescriptionClearAllAlarms [} 39] Calls Clear() for all alarms in the Raised state.
ConfirmAllAlarms [} 40] Calls Confirm() for all alarms with the confirmation state WaitForConfirmation.
GetAlarm [} 41] Returns the pointer to an existing alarm.
GetAlarmEx [} 41] Returns the pointer to an existing alarm.
IsAlarmRaised [} 42] Queries whether an alarm is in the Raised state.
IsAlarmRaisedEx [} 42] Queries whether an alarm is in the Raised state.
SendMessage [} 43] Sends a message.
SendMessageEx [} 44] Sends a message.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.8.1 ClearAllAlarms
-
Functions and function blocks
TE100040 Version: 1.2
This method calls the Clear() method for all alarms in the alarm state Raised.
SyntaxMETHOD ClearAllAlarms : HRESULTVAR_INPUT nTimeStamp : ULINT := 0; bResetConfirmation : BOOL := FALSE;END_VAR
Inputs
Name Type DescriptionnTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in 100 nanoseconds since January 1st,1601 (UTC).
bResetConfirmation BOOL If TRUE and the confirmation state is WaitForConfirmation, theconfirmation state is set to Reset.Otherwise the confirmation state is not changed.
Return value
Name Type DescriptionClearAllAlarms HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code
3.8.2 ConfirmAllAlarms
This method calls the Confirm() method for all alarms having the confirmation state WaitForConfirmation.
SyntaxMETHOD ConfirmAllAlarms : HRESULTVAR_INPUT nTimeStamp : ULINT := 0; END_VAR
Inputs
Name Type DescriptionnTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in 100 nanoseconds since January 1st,1601 (UTC).
Return value
Name Type DescriptionConfirmAllAlarms HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
-
Functions and function blocks
TE1000 41Version: 1.2
3.8.3 GetAlarm
Returns an interface pointer to an existing instance.
SyntaxMETHOD GetAlarm : HRESULTVAR_INPUT eventClass : GUID; nEventId : UDINT; ipSourceInfo : I_TcSourceInfo := 0; fbAlarm : REFERENCE TO FB_TcAlarm;END_VAR
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nEventId UDINT ID of the eventipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.fbAlarm REFERENCE TO FB_TcAlarm [} 23] Pointer to an alarm.
Return value
Name Type DescriptionGetAlarm HRESULT Returns ADS_E_NOTFOUND if no instance was found.
Returns S_OK if the method call was successful, otherwise anHRESULT as the error code.
3.8.4 GetAlarmEx
Returns an interface pointer to an existing instance.
SyntaxMETHOD GetAlarmEx : HRESULTVAR_INPUT stEventEntry : TcEventEntry; ipSourceInfo : I_TcSourceInfo := 0; // optional fbAlarm : REFERENCE TO FB_TcAlarm;END_VAR
-
Functions and function blocks
TE100042 Version: 1.2
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition.ipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.fbAlarm REFERENCE TO FB_TcAlarm [} 23] Pointer to an alarm.
Return value
Name Type DescriptionGetAlarmEx HRESULT Returns ADS_E_NOTFOUND if no instance was found.
Returns S_OK if the method call was successful, otherwise anHRESULT as the error code.
3.8.5 IsAlarmRaised
This method queries whether an alarm is in the Raised state.
SyntaxMETHOD IsAlarmRaised : BOOLVAR_INPUT eventClass : GUID; nEventId : UDINT; ipSourceInfo : I_TcSourceInfo := 0;END_VAR
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nEventId UDINT ID of the event.ipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.
Return value
Name Type DescriptionIsAlarmRaised BOOL Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.8.6 IsAlarmRaisedEx
This method queries whether an alarm is in the Raised state.
-
Functions and function blocks
TE1000 43Version: 1.2
SyntaxMETHOD IsAlarmRaisedEx : BOOLVAR_INPUT stEventEntry : TcEventEntry; ipSourceInfo : I_TcSourceInfo := 0;END_VAR
Inputs
Name Type DescriptionstEventEntry UDINT Event definition.ipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.
Return value
Name Type DescriptionIsAlarmRaisedEx BOOL Returns TRUE if the alarm is in the raised state.
3.8.7 SendMessage
This method sends a message.
SyntaxMETHOD SendMessage : HRESULTVAR_INPUT eventClass : GUID; nEventId : UDINT; eSeverity : TcEventSeverity; ipSourceInfo : I_TcSourceInfo := 0; nTimeStamp : ULINT := 0; ipArguments : I_TcArguments := 0;END_VAR
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nEventId UDINT ID of the event.eSeverity TcEventSeverity [} 68] Severity of the event.ipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.nTimeStamp ULINT 0: Current time stamp is used.
> 0: External time stamp in 100 nanoseconds sinceJanuary 1st, 1601 (UTC).
ipArguments I_TcArguments [} 51] Pointer to the ITcArguments interface.
-
Functions and function blocks
TE100044 Version: 1.2
Return value
Name Type DescriptionSendMessage HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.8.8 SendMessageEx
This method sends a message.
SyntaxMETHOD SendMessageEx : HRESULTVAR_INPUT stEventEntry : TcEventEntry; ipSourceInfo : I_TcSourceInfo := 0; nTimeStamp : ULINT := 0; ipArguments : I_TcArguments := 0;END_VAR
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition.ipSourceInfo I_TcSourceInfo [} 66] Pointer to an ITcSourceInfo interface.nTimeStamp ULINT 0: Current time stamp is used
> 0: External time stamp in100 nanoseconds since January 1st, 1601(UTC).
ipArguments I_TcArguments [} 51] Pointer to the ITcArguments interface.
Return value
Name Type DescriptionSendMessageEx HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.9 FB_TcMessage
This function block represents a message from the TwinCAT 3 EventLogger.
Syntax
Definition:FUNCTION_BLOCK FB_TcMessage EXTENDS FB_TcEventBase IMPLEMENTS I_TcMessage
-
Functions and function blocks
TE1000 45Version: 1.2
Inheritance hierarchy
FB_TcEventBase [} 33]
FB_TcMessage
Interfaces
Type DescriptionI_TcMessage [} 65] Provides methods and properties for the message handling.
Methods
Name Definition loca-tion
Description
EqualsTo [} 34] Inherited fromFB_TcEventBase[} 33]
Compares the event with another instance.
EqualsToEventClass[} 35]
Inherited fromFB_TcEventBase[} 33]
Compares the event class of the event with another eventclass.
EqualsToEventEntry[} 35]
Inherited fromFB_TcEventBase[} 33]
Compares the event definition of the event with another eventdefinition.
EqualsToEventEntryEx[} 36]
Inherited fromFB_TcEventBase[} 33]
Compares the event definition of the event with another eventdefinition.
GetJsonAttribute [} 36] Inherited fromFB_TcEventBase[} 33]
Returns the Json attribute.
Release [} 37] Inherited fromFB_TcEventBase[} 33]
Releases the instance created by the EventLogger again.
RequestEventClassName [} 37]
Inherited fromFB_TcEventBase[} 33]
Requests the name of the event class.
RequestEventText[} 38]
Inherited fromFB_TcEventBase[} 33]
Returns the text for the event.
Create [} 46] Local Creates a message instance in the EventLogger.
CreateEx [} 47] Local Creates a message instance in the EventLogger from an eventdefinition.
SetJsonAttribute[} 47]
Local Sets the Json attribute.
Send [} 66] I_TcMessage[} 65]
Sends a message.
-
Functions and function blocks
TE100046 Version: 1.2
Properties
Name Type Access Definition location DescriptioneSeverity TcEventSeverity
[} 68]Get Inherited from
FB_TcEventBase[} 33]
Returns the severity.
EventClass GUID Get Inherited fromFB_TcEventBase[} 33]
Returns the GUID of the event class.
ipArguments[} 39]
I_TcArguments[} 51]
Get Inherited fromFB_TcEventBase[} 33]
Returns the interface pointer for thearguments.
ipSourceInfo[} 39]
I_TcSourceInfo[} 66]
Get Inherited fromFB_TcEventBase[} 33]
The SourceInfo is created internally asthe default behavior. It then containsthe symbol name of the function blockthat instances FB_TcMessage asSourceName and the object ID of thePLC instance as SourceID.If the instance of FB_TcMessage ishidden with the attribute "hide", nosymbol name can be created internallyfor the default behavior.
nEventId nEventId Get Inherited fromFB_TcEventBase[} 33]
Returns the ID of the event.
stEventEntry TcEventEntry [} 68] Get Inherited fromFB_TcEventBase[} 33]
Returns the event definition.
nTimeSent ULINT Get Local Returns the time of the Send.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.9.1 Create
This method creates a message instance in the EventLogger.
SyntaxMETHOD Create : HRESULTVAR_INPUT eventClass : GUID; nEventId : UDINT; eSeverity : TcEventSeverity; ipSourceInfo : I_TcSourceInfo := 0;END_VAR
-
Functions and function blocks
TE1000 47Version: 1.2
Inputs
Name Type DescriptioneventClass GUID GUID of the event class.nEventId UDINT ID of the event.eSeverity TcEventSeverity
[} 68]Defines the severity.
ipSourceInfo I_TcSourceInfo[} 66]
Pointer to an ITcSourceInfo interface.
Return value
Name Type DescriptionCreate HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.9.2 CreateEx
This method creates a message instance in the EventLogger from an event definition.
SyntaxMETHOD PUBLIC CreateEx : HRESULTVAR_INPUT stEventEntry : TcEventEntry; ipSourceInfo : I_TcSourceInfo := 0;END_VAR
Inputs
Name Type DescriptionstEventEntry TcEventEntry [} 68] Event definition.ipSourceInfo I_TcSourceInfo [} 66] Interface pointer to the source information.
Default source information is created if no interface pointer istransferred.
Return value
Name Type DescriptionCreateEx HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.9.3 SetJsonAttribute
This method sets the JSON attribute.
-
Functions and function blocks
TE100048 Version: 1.2
SyntaxMETHOD SetJsonAttribute : HRESULTVAR_IN_OUT CONSTANT sJsonAttribute : STRING;END_VAR
Inputs
Name Type DescriptionsJsonAttribute STRING JSON string
Return value
Name Type DescriptionSetJsonAttribute HRESULT Returns S_OK if the method call was successful, otherwise an
HRESULT as the error code.
3.10 FB_TcSourceInfo
The source information of an event can be defined with this function block.
Syntax
Definition:FUNCTION_BLOCK FB_TcSourceInfo IMPLEMENTS I_TcSourceInfo
Interfaces
Type DescriptionI_TcSourceInfo [} 66] Provides read methods and read properties of a source information.
Methods
Name Definition loca-tion
Description
Clear [} 49] Local Resets the source information.
ExtendName [} 49] Local Appends the transferred string to the name.
ResetToDefault [} 50] Local Sets the properties to default values.sName is initialized with the symbol name of the instancedfunction block.nId is initialized with the object ID of the PLC instance.If the instance of FB_TcSourceInfo is hidden with the attribute"hide", no symbol name can be created internally for the defaultbehavior.
EqualsTo [} 67] I_TcSourceInfo[} 66]
Compares an instance with another instance.
-
Functions and function blocks
TE1000 49Version: 1.2
Properties
Name Type Access Definition location Descriptionguid GUID Get I_TcSourceInfo [} 66] Returns the GUID of the
source information.guid GUID SET Local Sets the GUID as source
information.nId UDINT Get I_TcSourceInfo [} 66] Returns the ID of the
source information.nId UDINT SET Local Sets the ID of the source
information.sName STRING(ParameterList.cSourc
eNameSize-1)Get I_TcSourceInfo [} 66] Returns the name of the
source information.sName STRING(ParameterList.cSourc
eNameSize-1)SET Local Sets the name of the
source information
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
3.10.1 Clear
This method resets the source information.
SyntaxMETHOD Clear
3.10.2 ExtendName
This method extends the name.
SyntaxMETHOD ExtendName : BOOLVAR_INPUT sExtension : STRING(255);END_VAR
Inputs
Name Type DescriptionsExtension STRING(255) Text to be appended to the right.
-
Functions and function blocks
TE100050 Version: 1.2
Return value
Name Type DescriptionExtendName BOOL Returns TRUE if the concatenation was successful.
Returns FALSE if the resulting character string is longer than theoutput character string and doesn't fit in the given output buffer.The memory requirement for the resulting string is then larger thanthat for the output string. The string is then truncated.
3.10.3 ResetToDefault
This method sets the source information to default values.
Default values:
sName is initialized with the symbol name of the instanced function block.
nId is initialized with the object ID of the PLC instance.
If the instance of FB_TcSourceInfo is hidden with the attribute "hide", no symbol name can be createdinternally for the default behavior.
SyntaxMETHOD ResetToDefault
-
Interfaces
TE1000 51Version: 1.2
4 Interfaces
4.1 I_TcArgumentsThis interface defines methods for the argument handling.
Inheritance hierarchy
__SYSTEM.IQueryInterface
I_TcArguments
Methods
Name DescriptionAddBlob [} 51] Adds binary data as an argument.
AddBool [} 52] Adds an argument of the type BOOL.
AddByte [} 52] Adds an argument of the type BYTE.
AddDint [} 53] Adds an argument of the type DINT.
AddDWord [} 53] Adds an argument of the type DWORD.
AddEventReferencId [} 54] Adds a reference to another event as an argument.
AddEventReferenceIdGuid[} 54]
Adds a reference to another event as an argument.
AddInt [} 55] Adds an argument of the type INT.
AddLInt [} 55] Adds an argument of the type LINT.
AddLReal [} 56] Adds an argument of the type LREAL.
AddReal [} 56] Adds an argument of the type REAL.
AddSInt [} 56] Adds an argument of the type SINT.
AddString [} 57] Adds an argument of the type STRING.
AddUDint [} 57] Adds an argument of the type UDINT.
AddUInt [} 58] Adds an argument of the type INT.
AddULInt [} 58] Adds an argument of the type ULINT.
AddUSInt [} 59] Adds an argument of the type USINT.
AddWord [} 59] Adds an argument of the type WORD.
AddWString [} 60] Adds an argument of the type WSTRING.
Clear [} 60] Removes all arguments.
4.1.1 AddBlob
This method adds binary data as an argument.
-
Interfaces
TE100052 Version: 1.2
SyntaxMETHOD AddBlob : I_TcArgumentsVAR_INPUT pData : PVOID; cbData : UINT;END_VAR
Inputs
Name Type DescriptionpData PVOID Pointer to the first byte of the binary data.cbData UINT Length of the binary data in bytes.
Return value
Name Type DescriptionAddBlob I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.2 AddBool
This method adds an argument of the type BOOL.
SyntaxMETHOD AddBool : I_TcArgumentsVAR_INPUT value : BOOL;END_VAR
Inputs
Name Type Descriptionvalue BOOL Value to be added.
Return value
Name Type DescriptionAddBool I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.3 AddByte
This method adds an argument of the type BYTE.
SyntaxMETHOD AddByte : I_TcArgumentsVAR_INPUT value : BYTE;END_VAR
-
Interfaces
TE1000 53Version: 1.2
Inputs
Name Type Descriptionvalue BYTE Value to be added.
Return value
Name Type DescriptionAddByte I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.4 AddDint
This method adds an argument of the type DINT.
SyntaxMETHOD AddDINT : I_TcArgumentsVAR_INPUT value : DINT;END_VAR
Inputs
Name Type Descriptionvalue DINT Value to be added.
Return value
Name Type DescriptionAddDINT I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.5 AddDWord
This method adds an argument of the type DWORD.
SyntaxMETHOD AddDWord : I_TcArgumentsVAR_INPUT value : DWORD;END_VAR
Inputs
Name Type Descriptionvalue DWORD Value to be added.
-
Interfaces
TE100054 Version: 1.2
Return value
Name Type DescriptionAddDWord I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.6 AddEventReferencId
This method adds a reference to another event as an argument.
SyntaxMETHOD AddEventReferenceId : I_TcArgumentsVAR_INPUT nEventId : UDINT;END_VAR
Inputs
Name Type DescriptionnEventId UDINT ID of the event.
Return value
Name Type DescriptionAddEventReferenceId I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.7 AddEventReferenceIdGuid
This method adds a reference to another event as an argument.
SyntaxMETHOD AddEventReferenceIdGuid : I_TcArgumentsVAR_INPUT nEventId : UDINT; EventClass : GUID;END_VAR
Inputs
Name Type DescriptionnEventId UDINT ID of the event.EventClass GUID GUID of the event class.
-
Interfaces
TE1000 55Version: 1.2
Return value
Name Type DescriptionAddEventReferenceIdGuid I_TcArguments
[} 51]Returns the I_TcArgument pointer again.
4.1.8 AddInt
This method adds an argument of the type INT.
SyntaxMETHOD AddINT : I_TcArgumentsVAR_INPUT value : INT;END_VAR
Inputs
Name Type Descriptionvalue INT Value to be added.
Return value
Name Type DescriptionAddInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.9 AddLInt
This method adds an argument of the type LINT.
SyntaxMETHOD AddLInt : I_TcArgumentsVAR_INPUT value : LINT;END_VAR
Inputs
Name Type Descriptionvalue LINT Value to be added.
Return value
Name Type DescriptionAddLInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
-
Interfaces
TE100056 Version: 1.2
4.1.10 AddLReal
This method adds an argument of the type LREAL.
SyntaxMETHOD AddLReal : I_TcArgumentsVAR_INPUT value : LREAL;END_VAR
Inputs
Name Type Descriptionvalue LREAL Value to be added.
Return value
Name Type DescriptionAddLReal I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.11 AddReal
This method adds an argument of the type REAL.
SyntaxMETHOD AddReal : I_TcArgumentsVAR_INPUT value : REAL;END_VAR
Inputs
Name Type Descriptionvalue REAL Value to be added.
Return value
Name Type DescriptionAddReal I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.12 AddSInt
-
Interfaces
TE1000 57Version: 1.2
This method adds an argument of the type SINT.
SyntaxMETHOD AddSInt : I_TcArgumentsVAR_INPUT value : SInt;END_VAR
Inputs
Name Type Descriptionvalue SINT Value to be added.
Return value
Name Type DescriptionAddSInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.13 AddString
This method adds an argument of the type STRING.
SyntaxMETHOD AddString : I_TcArgumentsVAR_IN_OUT CONSTANT value : STRING;END_VAR
Inputs
Name Type Descriptionvalue STRING Value to be added.
Return value
Name Type DescriptionAddString I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.14 AddUDint
This method adds an argument of the type UDINT.
SyntaxMETHOD AddUDInt : I_TcArgumentsVAR_INPUT value : UDINT;END_VAR
-
Interfaces
TE100058 Version: 1.2
Inputs
Name Type Descriptionvalue UDINT Value to be added.
Return value
Name Type DescriptionAddUDInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.15 AddUInt
This method adds an argument of the type INT.
SyntaxMETHOD AddUInt : I_TcArgumentsVAR_INPUT value : UINT;END_VAR
Inputs
Name Type Descriptionvalue UINT Value to be added.
Return value
Name Type DescriptionAddUInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.16 AddULInt
This method adds an argument of the type ULINT.
SyntaxMETHOD AddULInt : I_TcArgumentsVAR_INPUT value : ULINT;END_VAR
Inputs
Name Type Descriptionvalue ULINT Value to be added.
-
Interfaces
TE1000 59Version: 1.2
Return value
Name Type DescriptionAddULInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.17 AddUSInt
This method adds an argument of the type USINT.
SyntaxMETHOD AddUSInt : I_TcArgumentsVAR_INPUT value : USINTEND_VAR
Inputs
Name Type Descriptionvalue USINT Value to be added.
Return value
Name Type DescriptionAddUSInt I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.18 AddWord
This method adds an argument of the type WORD.
SyntaxMETHOD AddWord : I_TcArgumentsVAR_INPUT value : WORD;END_VAR
Inputs
Name Type Descriptionvalue WORD Value to be added.
Return value
Name Type DescriptionAddWord I_TcArguments [} 51] Returns the I_TcArgument pointer again.
-
Interfaces
TE100060 Version: 1.2
4.1.19 AddWString
This method adds an argument of the type WSTRING.
SyntaxMETHOD AddWString : I_TcArgumentsVAR_IN_OUT CONSTANT value : WSTRING;END_VAR
Inputs
Name Type Descriptionvalue WSTRING Value to be added.
Return value
Name Type DescriptionAddWString I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.1.20 Clear
This method removes all arguments.
SyntaxMETHOD Clear : I_TcArguments
Return value
Name Type DescriptionClear I_TcArguments [} 51] Returns the I_TcArgument pointer again.
4.2 I_TcEventBaseMethods and properties of an event are defined in this basic interface.
-
Interfaces
TE1000 61Version: 1.2
Methods
Name DescriptionEqualsTo [} 61] Compares the event with another instance.
EqualsToEventClass [} 62] Compares the event class of the event with another event class.
EqualsToEventEntryEx[} 63]
Compares the event definition of the event with another event definition.
GetJsonAttribute [} 63] Returns the Json attribute.
RequestEventClassName[} 64]
Requests the name of the event class.
RequestEventText [} 65] Returns the text for the event.
Properties
Name Type Access DescriptioneSeverity TcEventSeverity
[} 68]Get Returns the severity.
EventClass GUID Get Returns the GUID of the eventclass.
ipSourceInfo I_TcSourceInfo[} 66]
Get Returns a pointer to the sourcedefinition.
nEventId UDINT Get Returns the ID of the event.stEventEntry TcEventEntry [} 68] Get Returns the event definition.
Requirements
Development environment Target platform PLC libraries to includeTwinCAT v3.1.4022.20 PC or CX (x64, x86, ARM) Tc3_EventLogger
4.2.1 EqualsTo
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsTo : BOOLVAR_INPUT ipOther : I_TcEventBase;END_VAR
Inputs
Name Type DescriptionipOther I_TcEventBase [} 60] Event to be compared
-
Interfaces
TE100062 Version: 1.2
Return value
Name Type DescriptionEqualsTo BOOL Returns TRUE if the events match.
4.2.2 EqualsToEventClass
This method carries out a comparison with another event class specified at the input.
SyntaxMETHOD EqualsToEventClass : BOOLVAR_INPUT OtherEventClass : GUIDEND_VAR
Inputs
Name Type DescriptionOtherEventClass GUID Event class to be compared.
Return value
Name Type DescriptionEqualsToEventClass BOOL Returns TRUE if the event classes match.
4.2.3 EqualsToEventEntry
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsToEventEntry : BOOLVAR_INPUT OtherEventClass : GUID; nOtherEventID : UDINT; eOtherSeverity : TcEventSeverity;END_VAR
Inputs
Name Type DescriptionOtherEventClass GUID Event class of the event to be compared.nOtherEventID UDINT Event ID of the event to be compared.eOtherSeverity TcEventSeverity [} 68] Event severity of the event to be compared.
-
Interfaces
TE1000 63Version: 1.2
Return value
Name Type DescriptionEqualsToEventEntry BOOL Returns TRUE if the events match.
4.2.4 EqualsToEventEntryEx
This method carries out a comparison with another event specified at the input.
SyntaxMETHOD EqualsToEventEntryEx : BOOLVAR_INPUT stOther : TcEventEntry;END_VAR
Inputs
Name Type DescriptionstOther TcEventEntry [} 68] Event to be compared.
Return value
Name Type DescriptionEqualsToEventEntryEx BOOL Returns TRUE if the events match.
4.2.5 GetJsonAttribute
This method returns the JSON attribute.
SyntaxMETHOD GetJsonAttribute : HRESULTVAR_INPUT sJsonAttribute : REFERENCE TO STRING; nJsonAttribute : UDINT;END_VAR
Inputs
Name Type DescriptionsJsonAttribute REFERENCE TO STRING Reference to a variable of the type StringnJsonAttribute UDINT Length of the String variable
-
Interfaces
TE100064 Version: 1.2
Return value
Name Type DescriptionGetJsonAttribute HRESULT Returns S_OK if the method call was successful.
Returns ERROR_BAD_LENGTH if the length of the variable is toosmall.Otherwise HRESULT is returned as the error code.
4.2.6 RequestEventClassName
This method returns the name of the event class.
SyntaxMETHOD RequestEventClassName : BOOLVAR_INPUT nLangId : DINT; sResult : REFERENCE TO STRING; nResultSize : UDINT;END_VARVAR_OUTPUT bError : BOOL; hrErrorCode : HRESULT;END_VAR
In