Sv translation | |||||
---|---|---|---|---|---|
| |||||
Meldungsregeln legen fest, unter welchen Umständen Meldungen in QBRX erzeugt werden. In diesem Beitrag zeigen wir Ihnen exemplarisch anhand von zwei Beispielen, wie Meldungsregeln erstellt werden können.
Beispiel 1: Die Außentemperatur entspricht 0°C oder wenigerIm ersten Beispiel erstellen wir eine Meldungsregel, die dafür sorgt, dass immer dann eine Meldung generiert wird, wenn die Außentemperatur 0°C oder weniger entspricht. Der Gefrierpunkt ist ein in vielen Situationen relevanter Faktor und der Aufbau der Meldungsregel kann als Vorlage für andere, einfachere Berechnungsregeln herangezogen werden. Schritt-für-Schritt Anleitung
Beispiel 2: Die Lüftungsanlage ist außerhalb der Öffnungszeiten eingeschaltetIm zweiten Beispiel soll immer dann eine Meldung erzeugt werden, wenn die Lüftungsanlage eingeschaltet ist, obwohl die zugehörige Filiale gechlossen ist. Die Meldungsregel kann dabei helfen, Störungen an der Anlage ausfindig zu machen. Der Datenpunkt, der den Aktivitätsstatus wiedergibt, kann außerdem mit einer Vielzahl an anderen Datenpunkten ausgetauscht werden, falls man eine Warnung bezüglich anderer zeitabhängiger Annomalien erhalten möchte. Die Berechnungsregel ist nach der folgenden Logik aufgebaut: Bei Verzweigungen legt man immer eine Bedingung und zwei Ausgangsmöglichkeiten fest, welche abhängig davon berechnet werden. Bei einer Meldungsregel bedeutet dass, dass entweder eine Meldungsregel generiert wird oder eben nicht. Das wird mit den Konstanten "1" und "0" ausgedrückt, die für die booleschen Werte "wahr" und "unwahr". Bei "wahr" wird in diesem Fall eine Meldung generiert und bei "unwahr" nicht. Die Bedingung für die Meldungsgenerierung besteht aus zwei Komponenten: Der Öffnungszeit und dem Aktivitätsstatus. Die Bedingung für die Öffnungszeit wird mit dem Zeitplanblock definiert. Wird dieser auf "ist nicht aktiv" gesetzt, dann ist die erste Bedingung, dass ein Ereignis außerhalb der Öffnungszeiten eintreten muss ("aktiv" wäre innerhalb der Öffnungszeiten). Für die zweite Bedingung wird der Aktivitätsstatus der Anlage überprüft. Da der Aktivitätsstatus ein boolescher Datenpunkt ist, hat er nur zwei Werte: "1" steht für "wahr" und bedeutet, dass die Anlage eingeschaltet ist und "0" steht für "unwahr" und bedeutet, dass die Anlage ausgeschaltet ist. Mit Hilfe eines Vergleichsoperators wird deshalb als zweite Bedingung definiert, dass der Wert des Aktivitätsstatus gleich 1 sein muss, die Lüftungsanlage muss also eingeschaltet sein. Der Block für boolesche Operatoren definiert mit "und", dass beide Bedingungen gleichzeitig eintreten müssen, damit eine Meldungsregel erzeugt wird. Schritt-für-Schritt Anleitung
|
Sv translation | ||||||
---|---|---|---|---|---|---|
| ||||||
Message rules define, if and when messages are generated. You can describe those rules with the help of QUDE (QBRX universal data point editor) QUDE is a versatile tool for the creation of various evaluation rules. There are almost no restriction for the creation of new rules. In this article, we'll be talking about the creation of a new message rule rules in QUDE . As an example, we define a rule that warns us, once the outside temperature of your facility is 0°C (32°F) or below. Opening QUDE Before working with QUDE, you have to open the tool. Go to the message board of your designated facility and select the gear wheel-button on the right side. You are send to the message rule board. Create a new message rule by clicking on the plus-button and/or choose a message rule and click on thewith 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 only consists of a few bricks. You'll need four bricks: one evaluation, one for comparisons, one for numeric data points and a constant.
From now on, a message is generated whenever the outdoor temperature reaches 0°C and decreases further on. You can change these settings anytime.
Example 2: message rules with conditionsNow, we create similar message rules for the same example. However, this time we'll be using more parameters and a condintion brick. The new parameters are "true" and "false" for rule 1 and "1" and "2" for rule 2. We use them to define even more accurately if a certain situation occured. "1" and "true" always confirm such an occurence and trigger the creation of a fitting message. "0" and "false" confirm, that nothing predefined occured and therefore won't trigger a message. You'll need six bricksfor both rules: two result bricks, one brick for conitions with exceptions, one for comparisons, one for numeric data points and a constant.
Select "Save" in the lower right corner to save your changes. From now on, a message is generated whenever the outdoor temperature reaches 0°C and decreases further on. 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 has only two values: "1" for "ture", 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
|