Alarm Configuration
SDK v1 supports simple alarm monitoring and raising through Modbus Server tag configuration.
Existing alarm states can be mapped to the application for monitoring using the Discretes register type in the PDEF editor.
For raising your own alarms, you will need to create custom tags and set alarms limits.
For future versions of the SDK, more comprehensive alarm handling will be available, including registering of new alarms in application code.
Alarm Mapping
Alarms, both built in and custom, can be made available to an application by mapping the desired property to a tag in the Modbus server.
For example, a custom alarm can be created through Unity (in this case to an AI tag called PercentAI
) by using the Deploy/SYSTEM/User Alarm Config page:
Include the alarm in the Modbus server (by mapping your alarm property) to make it available to your application, in the same manner as any other tag.
For example, the IsAsserted
property is show mapped here:
To raise custom alarms in your application, the following steps should be taken:
- Create a user tag in the Modbus Server (of
ConstructFromMnemonic
type) and Deploy the updated map. - In Unity, add alarm limits to the new tag using the User Alarm Config page. For simple on/off alarms, set the alarm limits (for example) to LoLo/Lo = -10, Hi = 0, HiHi = 10.
- Create the corresponding vars.json tag configured as described in the Modbus Configuration section.
- From your application, write 1 (one) to the tag to set the alarm, and 0 (zero) to clear the alarm. A 'Hi' alarm will be raised when the tag is equal to 1. Use the
Display Name
Alarm property (in User Alarm Config) to describe your alarm condition.