Language selection:
Skip to main navigation Skip to main content Skip to page footer

Use of macro functions in the context of notification and alerting

The monitoring systems from Didactum support macro functions within notifications and alarms. By using macros, the recipient receives detailed information about critical events or state changes. Macros consist of a percent sign followed by an associated number. The networked monitoring systems from Didactum offer the following macros:

 MacroDescriptionExample
 %1Description of the triggered logic.if 'Onboard Temperature' (id=201001) in state 'high alarm'; and 'Onboard Voltage DC' (id=203001) in state 'high alarm'; then 'Power‑1' (id=304001) changes to state 'on' immediately, once; 'Simple_Mail' (id=601001) changes to state 'on' immediately, once.
 %2State of the logic elements at the time of triggering that are contained in the “IF” conditions.'Onboard Temperature' (id=201001) in state 'high alarm'; 'Onboard Voltage DC' (id=203001) in state 'high alarm';
 %3Time of the triggering of the logic element.15:35:21 2017/06/28
 %4Name / label of the logic circuit.'Logic_Temp_01'
 %5Name of the sensor whose state change caused the logic to trigger.'Onboard Temperature'
 %6State of the sensor that caused the logic to trigger.'high alarm'
 %7Sensor value or switch state at the time the logic is triggered.'27.60'
 %8ID of the sensor that triggered the logic.'201001'

Adjusting the macros

The macros %5, %6 and %7 can be customized with the help of an identifier {id}. Example:

 MacroDescriptionExample
 %5{id}Sensor name with given ID.%5{201002} Sensor name
 %6{id}State of a sensor with a given sensor ID.%6{201002} returned state: 'normal'
 %7{id}Value of the measured sensor value with a given ID.%7{201002} returned sensor value: '26.50'

Note: If a sensor with the specified identifier (ID) is not found by the Didactum monitoring system, the message “id = xxxx not found” is returned.

Logic circuitry of macros

The macro %8 can be used to trigger a logic circuit. The macros %5, %6 and %7 can be set as parameters. The following information can be accessed using the macro function:

 MacroExampleDescription
 %1if module 'Autodetect' (id=2021) in state 'alarm'; then 'Power‑1' (id=304001) changes to state 'on' immediately, once; 'Power‑2' (id=304002) changes to state 'off' immediately, once; 'Simple_Mail' (id=601001) changes to state 'on' immediately, once;When the module “Autodetect” switches once into the state “Alarm” (without repetitions), the relays “Power‑1” and “Power‑2” are switched. An e‑mail notification is sent in the form “Simple_Mail”. The module goes into the “Alarm” state when an element or several elements are in the “Alarm” state.
 %2module 'Autodetect' (id=2021) in state 'alarm';Module “Autodetect” and the triggering state.
 %311:14:41 2017/04/13Time and date of the logic circuit.
 %4'Logic_Analog_Sensors'Label / name of the logic circuit.
 %5'Autodetect'Name of the sensor (module) that triggered the logic.
 %6'alarm'State of the sensor (module) that triggered the logic circuit.
 %7'not supported'The measured value or state of the sensor at the time of the logic circuit. Modules do not have such a field. In this case, “not supported” is displayed.
 %8'107002'Sensor ID that is contained in the module and triggered the alarm. In our case it is the water sensor. This macro allows the identification of the affected sensor.
 %5{%8}'Analog‑2‑WATER'Sensor type and name of the affected sensor.
 %6{%8}'alarm'Status of the sensor.
 %7{%8}'1'Current state / value of the affected sensor (0 = dry, 1 = wet).
 %5{201002}'Analog‑1‑TEMPERATURE'Sensor type and name of any sensor. In this case it is the temperature sensor.
 %6{201002}'high warning'Status of the corresponding sensor ID. In this case it is the temperature sensor.
 %7{201002}'28.50'The current state / value of the sensor ID. Here it is the current temperature value of the temperature sensor.

Macros for group functions:

Using the group function the number of logics / logic circuits to be created in the Didactum monitoring system can be significantly reduced. In the example below we create a group that consists of the temperature sensors connected to our monitoring system:

 %1This macro should be included in every notification.Because in our example we do not use a logic circuit, this macro is not useful.
 %2This macro should also be included in every notification.Because we do not use a logic circuit in our example, this macro is likewise omitted.
 %319:45:19 2017/05/13Time and date of the state change of the “Temperature sensors” group.
 %4'Group_Temperature_Only'Name / label of the temperature sensors group.
 %5'201002-temperature'Name of the sensor (module) that initiates the state change. A state change of the group triggers the sending of notifications.
 %6'high alarm'State of the sensor (module) that triggered the notification.
 %7'27.30'Temperature value of the sensor at the time the notification is triggered.
 %8'201002'ID of the affected temperature sensor that changed the group state and caused the notification to be sent.
 %5{%8}'201002-temperature'Name and label of the affected temperature sensor within the defined group. Similar to macro %5.
 %6{%8}'high alarm'Status of the sensor. The sensor ID is taken from the affected group. In this case the behavior is similar to macro %6.
 %7{%8}'27.30'Measured value of the affected sensor. The sensor ID is taken from the affected group. In this case the behavior is similar to macro %7.
 %5{201002}'Analog-1-TEMPERATURE'Sensor type and name of the sensor.
 %6{201002}'high warning'State of the sensor ID. Any sensor can be queried here. In our example it is the temperature sensor.
 %7{201002}'29.50'Current measured value of the sensor with ID 201002.

As of: 15.04.2017

This website uses cookies

This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.

Essential cookies enable basic functions and are necessary for the website to function properly.
Statistics cookies collect information anonymously. This information helps us to understand how our visitors use our website.
Marketing cookies are used by third parties or publishers to display personalized advertisements. They do this by tracking visitors across websites.