Overview Status evaluation

This function block turns values into a readable message. A table defines row by row which text, which symbol and which colour apply.

An example: the input carries the fault code of a device. If it is 0, "Everything OK" should be shown in green, at 1 "Service due" in yellow and from 2 onwards "Fault" in red. Instead of wiring up several control elements for this, it is defined once in the function block.

The result is displayed with the control element Status display, which is linked to the function block with the right mouse button. The text therefore exists in one place only: change it once and it changes everywhere.

The outputs can additionally be assigned to addresses and used as usual, for example for the control elements Dynamic text and Dynamic graphic.

Inputs

E1 ... E8
Input 1 to 8
The values that are checked. How many inputs the function block has is set by the parameter "Number of inputs". An input that is not linked supplies 0. If the input carries a text, it can be checked with "contains".

Outputs

TX
Status text
The text of the matching row, with the placeholders already replaced. The output is only sent when the text actually changes.
NR
Row number
The number of the matching row, counted from the top. 0 means that no condition applies and the default row is used.
WE
Status value
The value stored in the row. It allows the result to be used further in the program, for example as a level for a message.
SY
Symbol number
The number stored in the row. It can be chosen freely and is intended to drive an existing "Dynamic graphic" control element.
FA
Colour
The background colour of the row as a number. The output can be assigned directly to a colour address.
AK
Active
1 as long as at least one condition applies, otherwise 0.

Parameters


Conditions
The button opens the table in which the rows are entered. Its structure is described below.

Number of inputs
How many inputs the function block gets, 1 to 8.

Evaluation
Which row applies when several conditions are true at the same time:
  • First matching row - the topmost one wins. This is the normal case: the most important message is put at the top.
  • Last matching row - the bottom one wins.

States and conditions

The dialog has three parts.

On the left is the list of states. Every state can be expanded and holds its conditions below it. The first condition starts with "if", every further one is attached with "and" or "or". A state applies as soon as its conditions together are true.

The states are numbered. This number is exactly the value present at output NR.

On the right is the display of the currently selected state: text, symbol, colours, status value and symbol number. It applies to the whole state, no matter which of its conditions is true. When a condition is clicked, the area shows the display of the state it belongs to. The divider between list and display can be moved.

At the bottom is what applies as long as no condition is true. Output NR is 0 then.

The buttons at the top add, delete, duplicate and move states and conditions. Moving always happens within the own level: states among states, conditions within their state. The order of the states also decides which one applies when several are true at the same time.

Columns of a condition

Column
Meaning
State
The first condition of a state reads "if" here. For every further one it is selected how it relates to the preceding ones:
  • and - both must be true.
  • or - one of the two is enough.
Evaluation runs from top to bottom, without "and" taking precedence over "or".
Type
How the condition is entered: Comparison using the selection fields or Formula as a freely written expression. Only the fields of the selected type are shown; when switching, the other input is cleared so that nothing stays in the row that is no longer evaluated.
Input
Which input is checked.
Comparison
The type of comparison: == equal, != not equal, < less, <= less or equal, > greater, >= greater or equal as well as contains and does not contain for text inputs.
Value
What is compared against. Numbers always with a decimal point. With "contains" the entered text is searched for within the text of the input; upper and lower case matter. If the input carries a number, it is written out as text for this.
Formula
The expression when the condition is set to "Formula". The condition is true as soon as the formula returns something other than 0. It is checked while it is being typed; as long as something is wrong, the dialog cannot be accepted.

The button next to it opens the same editor as the function block Formula: with a short reference of all characters and functions beside it and with the position of the error highlighted. For longer expressions it is the more convenient input. The notation is described there as well.

Display of a state

Field
Meaning
Text
The status text of this state. It may contain placeholders, see below.
Symbol
The button opens the image selection of the project. The waste bin next to it removes the image again; it is only shown when an image is set. Without an image the control element shows the text only.
Font
Text colour of this state.
Background
Background colour of this state. It is also present at output FA.
Status value
The value that is present at output WE for this state.
Symbol number
The number that is present at output SY for this state.

Placeholders in the text

The input values can be inserted into the status text. This produces messages such as "Storage 73 % charged" without having to place a separate value display next to it.
Placeholder
Meaning
Example with E1 = 72.6
%1 ... %8
The value of the respective input
Storage %1 gives "Storage 72.6"
%1.0 ... %1.9
The value with the given number of decimal places
Storage %1.0 % charged gives "Storage 73 % charged"
%%
A single percent sign
%1.0 %% gives "73 %"

Example

Input E1 carries the fault code of a heat pump. The evaluation is set to "First matching row".
State
Condition
Display
Default
no row matches, NR = 0
"No value", grey
1
E1 == 0
"Everything OK", green, status value 0
2
E1 == 1
"Service due", yellow, status value 1
3
E1 >= 2
"Fault %1.0", red, status value 2

Notes

The function block calculates on every change at the inputs. The status text is only sent out when it really changes, so the bus is not loaded.

If output TX is assigned to a KNX group address, the limit of the KNX data type of 14 characters applies. Inside the installation and for the status display the texts may be longer.


See also general parameters of all function blocks.