Skip to content

Alarm Configuration

Modbus SDK supports simple alarm monitoring and raising through Modbus Server data point 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 for the AI tag called PercentAI by using the Deploy/SYSTEM/User Alarm Config page in Unity Edge: Custom Alarm Config

Include the alarm in the Modbus server (by mapping your alarm property) to make it available to your application.

For example, the IsAsserted property is shown mapped here:
Custom Alarm Mapping

To raise custom alarms in your application:

  1. Create a user tag in the Modbus Server (of ConstructFromMnemonic type) and deploy the updated map.
  2. In Unity Edge, 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.
  3. Create the corresponding vars.json tag configured as described in the Modbus Configuration section.
  4. 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.