Alarms

Creating a New Alarm

When defining a new alarm, the following fields are configured:

Field Description
msgId Unique numeric identifier of the alarm. This is the system's main reference key.
Category Defines the type/severity of the alarm. One of the following:
- Warning – Non-critical issue, informative.
- Error – Standard error requiring user attention.
- Information – Purely informational, no action required.
- Error without confirmation – Error that does not require user confirmation.
Title Displayed text when the alarm becomes active. Used to notify the user of the event.
Title Inactive Optional field. Displayed when the alarm is inactive but not acknowledged. Useful for showing what occurred even after the event has cleared.

Title Formatting and Placeholders

The Title and Title Inactive fields support dynamic content and translations, using the following syntax:

1. Translations ({{placeholder}})

Any part of the title wrapped in double curly braces will be treated as a translation key.

Title Example:
{{over_temperature}} on line %p%!
This will fetch the localized version of "over_temperature" from the translation dictionary.

2. Value Placeholders (%p%)

You can use up to five %p% placeholders in the title.
These placeholders will be dynamically replaced by parameter values provided when the alarm is triggered in the PLC code.
Parameters are passed via the setActive or manage methods in CODESYS:

setActive(msgId, param1, param2, param3, param4, param5, trans1, trans2, trans3, trans4, trans5, moduleId)

Example:
{{sensor_failure}} on unit %p%, value %p%
This could render as:
Sensor Failure on unit 3, value 78.4

3. Translation Placeholders (%t%)

%t% placeholders are used for translated string values, similar to %p%, but specifically for translation parameters.
You can pass up to five %t% values, which will be looked up using translation keys.
This allows inserting translated text at runtime based on PLC logic:
%t% alarm on %p%
With %t% = "low_pressure" → translates to Low Pressure
Final title:
Low Pressure alarm on Zone 1

%t% alarm on %p%
{{sensor_failure}} on unit %p%, value %p%
setActive(msgId, param1, param2, param3, param4, param5, trans1, trans2, trans3, trans4, trans5, moduleId)
{{over_temperature}} on line %p%!
Title Inactive
Title
Error without confirmation
Information
Error
Warning
Category
msgId