...
Sv translation | |||||
---|---|---|---|---|---|
| |||||
Message rules define, if and when messages are generated. In this article, we'll be talking about the creation of new message rules in QUDE with the help of two examples.
Example 1: simple message rules without conditionsFor this example, we create a message rule that generates a new message whenever the outdoor temperature of your facility is 0°C (32°F) or below. The freezing point is relevant for various situations and the structure of the evaluation rule can be used as a template for many other simple calculations. Step-by-step instruction
2nd example: the ventilation system is switched on outside the opening hoursFor the second example, we would like to generate a calculation rule, whenever the ventilation system is switched on, even though the matching store is closed. This calculation rule can help finding faults in the system. The data point or the activity status can also be switched with various other similar data points, if you would like to analyse other time-dependent values. For this calculation rule, we used the following logic: When using conditions with a firther outcome, you define a condition and two possible outcomes that can be calculated. In the case of message rules, this setup is often used to either create a message rule, or not. The constants "1" and "0", that stand for the boolean values "true" and "false", express this logic. A "true" result will generate a message rule, while "false" won't create one. The condition consists of two components: the activity status and the opening hours. The condition for opening hours is defined in the the schedule brick. We use the time outside the opening hours as a condition by setting the schedule brick to "is not active" ("active" would mean during the opening hours). The second condition verifies the activity status of the ventilation system. The activity status is a boolean data point and therefore only has two values: "1" for "true", which means that the system is switched on, and "0" for "false", which indicates a switched off system. The relational operator helps us to check, if the system is switched on by equating the value of the data point with the constant value "1". The system is switched on whenever the values are equal. The brick for boolean operators defines with "and" that both conditions have to be "true" to generate a message rule. Step-by-step instruction
|