Configuration
You can use the TwinCAT OPC UA Configurator to configure the Alarms & Conditions functionality. To configure a symbol for Alarms & Conditions, you must perform two steps:
- The symbol must have been enabled for Data Access (see chapter Enabling symbols).
- A ConditionController must be created that allows alarms and events to be grouped.
- Alarm and event texts must be created.
- Configuration parameters must be defined for the symbol.
Creating a ConditionController
In the stand-alone version of the TwinCAT OPC UA Configurator, you can configure the ConditionController via the Alarms & Conditions tab. In the following screenshot, for example, a ConditionController with the name "MyConditionController" has been configured.
Additional ConditionControllers can be created or existing ConditionControllers can be edited or removed from the configuration via the context menu.
Creating alarm and event texts
The texts that are to be used when reading an alarm or event can be stored as so-called "resources" in the TwinCAT OPC UA Server. These texts can be defined in several languages, whereby the language is identified by the respective country code. In the TwinCAT OPC UA Configurator, these resources are added via the Resources tab in the Alarms & Conditions configuration.
You can add, delete or edit other languages as a resource via the context menu. In the screenshot above, two languages have been configured as resources: de-DE (German/Germany) and en-US (English/USA). The texts are maintained in tabular form within a language and can also be copied and pasted from Microsoft Excel.
The configured texts are assigned across languages via their ID, for example:
Use of the national language for an Alarm/Event The language text used when triggering an alarm or event depends on the country code used to connect an OPC UA client to the server. |
Configuring a symbol
Once the alarm and event texts have been configured, you can also use them to configure a symbol. The symbol configuration is carried out in the Settings tab. You can configure an icon manually or simply drag and drop it onto the configuration area using the integrated Target Browser.
The symbol is then added to the selected ConditionController. In the following configuration dialog, you can define the alarm type to be configured as well as the threshold values and also select the language texts.