Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Sv translation
languageen

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.

Info
titleHelpful articles

Take a look at our articles "Introduction to QUDE" and "Bricks in QUDE an their functionality" if you would like to know more about the tool itself. 

If you would like to read more about message rules in general and how to create them, take a look at our fitting article.



Example 1: simple message rules without conditions

For 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

  1. Add the data point "Outdoor temperature" to your list of usable data points

    • Select the data point you would like to use for your evaluation.

       

  2. Drag and drop all necessary bricks into the work surface and combine them

    • Used bricks: One result brick, one brick for numeric data points, one brick for relational operators and one constant

       

  3. Assign the data point to the matching brick

     

  4. Define the outdoor temperature that should trigger the creation of a message rule

    • Combine the outdoor temperature with the left space inside the brick for relational operators and the constant "0" with the right space. Set as a relational operator. Link the whole combination to the result brick.

    • From now on, a message will be generated, whenever the outdoor temperature is 0°C (32°F) or below.

       

  5. Save your settings


 


2nd example: the ventilation system is switched on outside the opening hours

Image AddedImage Removed

For 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 "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: "true", which means that the system is switched on, and "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 boolean constant "true". 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

  1. Add the data point "activity status" to your list of usable data points

    • Select the data point you would like to use for your evaluation.

       

  2. Add the facility property "opening hours" to your list of usable properties

    • Select the property you would like to use for your evaluation.

       

  3. Drag and drop all necessary bricks into the work surface and combine them

    • Used bricks: One brick for conditions with further outcome, one for properties, boolean data points, schedules, relational operators, boolean operators, two result bricks and three constants

       

  4. Assign the data point and property to the matching bricks

     

  5. Set the conditions at "if": The system is switched on outside the opening hours

    • The condition of the message rule consists of thee components: Opening hours, activity status and the combination of these two by a boolean operator

    • To define the opening hours, link the property brick to the free space withing the schedule brick. Choose "is not active" to get the time outside the opening hours as the condition. 

    • Link the activity status to the left space inside the brick for relational operators and the boolean constant "true" the to right space. The relational operator is =. The condition is true and the system is switched on whenever the boolean data point equals "true".

    • Link both combination to the free spaced inside the brick for boolean operators. Select "and" as the operator. 

    • Link the whole combination to "if" at the conditional brick. Now, both conditions have to be true, to trigger what is defined at "do".


  6. Define at "do" that a message should be generated
    • Link a result brick together with the boolean constant "true" to to conditional brick at "do"
    • A message will be generated, whenever the condition is "true"
       
  7. Define at "else" that a message should not be generated
    • Link a result brick together with the boolean constant "false" to to conditional brick at "else"
    • No message will be generated, whenever the condition is "false"
     
  8. Save your settings