Functions
Standard Functions
Standard library functions.
alarmCollectorInit
Initializes AlarmLib and provided Alarm Collector.
Direction | Name | Type | Description |
---|---|---|---|
In | pAlarmCollector | alarmCol_typ* | An instance of the alarmCol_typ* to be used by AlarmLib |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmCollectorCyclic
Cyclic operation of AlarmLib.
Direction | Name | Type | Description |
---|---|---|---|
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColSetError
Set User Alarm. This alarm will be auto reset.
Direction | Name | Type | Description |
---|---|---|---|
In | pName | STRING | Pointer to STRING containing the name of the alarm |
In | pMessage | STRING | Pointer to STRING containing the message for the alarm |
In | code | UDINT | Alarm code |
In | severity | UDINT | Alarm severity |
In | pReset | UDINT | Pointer to reset variable (BOOL*) that will be set after alarm is acknowledged |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColSetError
Set User Alarm with additional information. This alarm will be auto reset.
Direction | Name | Type | Description |
---|---|---|---|
In | pName | STRING | Pointer to STRING containing the name of the alarm |
In | pMessage | STRING | Pointer to STRING containing the message for the alarm |
In | code | UDINT | Alarm code |
In | severity | UDINT | Alarm severity |
In | pReset | UDINT | Pointer to reset variable (BOOL*) that will be set after alarm is acknowledged |
In | pAdditionalInfo1 | STRING | Pointer to STRING containing additional information |
In | pAdditionalInfo2 | STRING | Pointer to STRING containing additional information |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColSetErrorFUB
Set User Alarm Function Block. This alarm will need to be reset.
Direction | Name | Type | Description |
---|---|---|---|
In | pName | STRING | Pointer to STRING containing the name of the alarm |
In | pMessage | STRING | Pointer to STRING containing the message for the alarm |
In | code | UDINT | Alarm code |
In | severity | UDINT | Alarm severity |
In | pReset | UDINT | Pointer to reset variable (BOOL*) that will be set after alarm is acknowledged |
In | pAdditionalInfo | STRING[2] | Pointer to Array of STRINGs containing additional information |
In | set | BOOL | Set alarm |
In | set | BOOL | Reset alarm |
Out | alarmActive | BOOL | Alarm is currently active |
Out | acknowledged | BOOL | Alarm is active and acknowledged. If alarm is already reset this will stay true for 1 cycle |
Misc Functions
Utility functions.
alarmColStatusToString
Copies a STRING description for statusID into dest. statusID may be either a AlarmLib status or an AlarmX status.
Direction | Name | Type | Description |
---|---|---|---|
In | dest | UDINT | Pointer to STRING where description should be copied |
In | statusID | DINT | Status ID to get description for |
In | destSize | UDINT | Size of dest |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmXStatusToString
Copies a STRING description for statusID into dest. statusID should be an AlarmX status.
Direction | Name | Type | Description |
---|---|---|---|
In | dest | UDINT | Pointer to STRING where description should be copied |
In | statusID | DINT | Status ID to get description for |
In | destSize | UDINT | Size of dest |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
Legacy Functions
These functions are intended for legacy support when upgrading from ErrorLib. These should not be used for new applications!
alarmColAddSourceByAddress
Monitor User Alarm. This alarm will be auto reset.
Direction | Name | Type | Description |
---|---|---|---|
In | pSourceName | STRING | Pointer to STRING containing the name of the source |
In | pErrorActive | UDINT | Pointer to BOOL indicating if error is active |
In | pErrorString | STRING | Pointer to STRING containing the message for the alarm |
In | pErrorID | UDINT | Pointer to UDINT containing Alarm code |
In | pAcknowledge | UDINT | Pointer to reset variable (BOOL*) that will be set after alarm is acknowledged |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColAddSourceByName
Not Implemented! Wrapper for alarmColAddSourceByAddress. Monitors User Alarm by variable name.
Direction | Name | Type | Description |
---|---|---|---|
In | pSourceName | STRING | Pointer to STRING containing the name of the source |
In | pVarName | UDINT | Pointer to STING containing the name of the variable to be monitored |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColAddError
Set User Alarm. This alarm will be auto reset.
Direction | Name | Type | Description |
---|---|---|---|
In | pSourceName | STRING | Pointer to STRING containing the name of the source |
In | pErrorString | STRING | Pointer to STRING containing the message for the alarm |
In | ErrorID | UDINT | Alarm code |
In | pAcknowledge | UDINT | Pointer to reset variable (BOOL*) that will be set after alarm is acknowledged |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |
alarmColAcknowledge
Not Implemented, API subject to change.
Direction | Name | Type | Description |
---|---|---|---|
In | ErrorIndex | UINT | |
Return | Status | ALARMCOL_ERR_enum | Status of fn call |