General comments on logic
Note
Exclusion of liability
Although these documents have been created and checked with the greatest of care, errors can not be completely excluded. Gira therefore does not accept any legal liability or any warranty with regard to their contents.
Subject to change without prior notice!
General information
- The logic of the HomeServer is event-controlled.
- It is not processed in cycles.
- The logic module is recalculated every time a telegram arrives. Time-controlled modules re-calculate after the time set has elapsed.
- After startup, the HomeServer keeps a process image in its memory. This is formed permanently by monitoring the entire telegram traffic of the connected EIB and the internal processes. Group addresses do not normally have to be scanned during operation. If this is required, e.g. when replacing EIB components, then there is a command for this
How the logic works in the HS
- First, the group addresses are scanned (with the flag "Request on start").
- The logic is then initialized:
- If an input has a fixed value then the input is set to this value.
- The other wired inputs are set to the value of the first assigned communication object (this is either the scanned value or the initialization value of the communication object)
- The non-wired inputs are set to the initialization value of the input.
- The outputs are now calculated according to the setting of he logic gate ("Recalculation on start").
- This completes the initialization procedure.
- In running operation, the module is recalculated every time a telegram arrives.
- All inputs thereby have the value of the last received telegram.
- Whether or not the output transmits depends on the value calculated and on the setting "Send by change".
There is a detailed
description of the procedure available as a PDF document.
Behavior on startup
The values of the group addresses should be read out (scanned) when the HomeServer starts up. This ensures that the HomeServer knows the current states.
To scan group addresses and their states or contents, read flags must be set in the corresponding communication objects of the connected participants, according to the rules of the EIB. The group addresses that are requested by the HS are set in the HomeServer Expert under "communication objects".
Initialization value
All inputs are queried when starting the HomeServer. If communication objects are assigned multiply then only the value of the first is requested (in this example at group address 7/1/0). The state/value of an EIB communication objects depends on the settings of "Scan on start" and "Initial value". Before the logic is queried, the first states of all EIB objects must be determined (scan procedure has been completed). Every logic module is calculated once on startup, if this is indicated for the module.
Example 
First, the states of all EIB
communication objects are determined. If "Scan on start" has been selected in EIB communication objects 7/1/0 to 7/1/3 then the HomeServer requests the respective states on startup. After completing all requests, the states of the first respective assignment are compared. State 7/1/0 is compared to 7/1/2 and the link result is output at 8/1/0.
Telegram late limitation
The HomeServer transmits a maximum of 20 EIB telegrams per second (frequency) to the EIB. If more transmission telegrams are waiting then these are buffered in a queue in the HomeServer. The values are then sent to the EIB at this frequency until the queue is empty. The frequency can be changed. The standard value is 6 telegrams per second.
The frequency can be changed under
Project\
EIB-/iETS linking.
Executing commands
A special characteristic of the HomeServer logic is that every output can be assigned HomeServer commands.
The commands are only run then a telegram with the value "not equal to zero" is sent via the appropriate output.
Any number of commands can be assigned to a module. These are processed in the order in which they are assigned.
Logical "true" and "false"
In the logic modules, a difference is made between the value zero and the value not equal to zero of the input telegram.
Zero corresponds to false or off.
Not equal to zero corresponds to true or on.
Note: Negative values are not equal to zero and are therefore true.
Type conversion
When assigning the communication objects, a difference is made between the types text and numerical. Inputs/outputs of the type text can only be assigned communication objects of data type 14 bytes. Inputs/Outputs of the type numerical can be assigned communication objects of all numerical data types (e.g. 1 bit, 16 bit, etc.). An "implied conversion" is made. The definition for "true" and "false" described above applies here. This makes conversion commands superfluous. There are outputs that reduce the value to zero or one - independent of the size of the input value (see "Output assignment").
Linking the logic modules
The logic modules can be linked via communication objects (internal/EIB) or directly by assigning an output to an input.
Note: However, we recommend that when possible you directly connect the inputs/outputs of the modules.
Input assignment
Any number of communication objects or outputs can be assigned to every input; however, only one fixed value can be assigned for each input.
When starting the HomeServer, only the input object that has been assigned as the first object is queried in each case.
All input telegrams are then evaluated.
Example 1: 
Both inputs (E1, E2) are each assigned two group addresses. The result is recalculated every time a telegram arrives. Thereby, the last state of the second input is always compared to the value of the first input at which the new telegram has arrived. The result of the link is sent to group address 8/1/0.
Example 2: 
Input E2 is assigned a constant (fixed value). On arrival of a telegram from group address 7/1/0 or 7/1/1, this is compared with the Fix 1 constant. The result of the link is sent to group address 8/1/0 via output A1. The assignment of a constant (e.g. "Fix 1"), that is not at the first position of an input has no meaning! The constant uniquely determines the value of the input on startup The input is later determined by the value of the last telegram.
Example 3 
no value is assigned to input E2. The state of E2 is thereby preassigned by an "initial value". The AND gate has the value 1 by definition. The initial value is written subsequently for every logic module. On arrival of a telegram from group address 7/1/0 or 7/1/, this is compared to the preassigned value (value=1).
The result of the link is sent to group address 8/1/0 via output A1.
Initial value of the input
An initial value is preassigned to every input This value is assumed during the logic calculation when the input value is undefined (e.g. when the input is not assigned).
Negating the input
Input values can be negated. The input value is first negated and then processed.
Output assignment
Any number of communication objects or inputs can be assigned to every output. All assignments contain the value of the output.
Example: 
The result of the linking of E1 & E2 is sent to
all group addresses assigned to Output A1. The output objects are sent to the EIB in the order of this assignment 8"from top to bottom").
Initial value (starting value) of the output
An initial value is preassigned to every output internally in the HomeServer as long as the inputs are also assigned an initial value. The values at the input of a logic module depend on which initial values have been stored in the communication objects of the participants. The evaluation of these input values then also returns the output values of the logic module.
If there are no values of a communication object at the input of a logic module, then this input is wired with internal settings from the HomeServer (see also, "Input assignment, Example 3").
When starting the HomeServer, the EIB is scanned for connected participants. The initial values of the assigned communication object are then at the outputs and inputs of a logic module. If no value can be assigned to the outputs and inputs because, e.g. a participant has not been detected, then internal preassigned initial values are stored in the HomeServer.
Behavior of the outputs (send, send by change, negates)
Generally, there are four different types of output: "Send", "Send by change" and each of these negated.

Send
The outputs designated "send" transfer a value each time a telegram is received. The value is a result of the evaluation of the corresponding input telegram by the logic module.
Send by change ("SbC")
The outputs designated "send by change" only transfer a value each time the output is changed. This means: If the inputs are wired with values whose evaluation in the logic module causes a change to the value at the "send" output, then the value at the "send by change" output is sent. If the value at "send" remains unchanged then no telegram is sent via "send by change" .
Example: The result of a link has the value 1. After the arrival of a new telegram and a recalculation, the result is still 1. A telegram is now sent via the "send by change" output.
Certain SbC outputs do not send any telegram when the HomeServer is restarted. This corresponds to an internal setting preassigned initial value). These outputs are designated with "Do not send on a restart" (In this regard, refer also to the following "Example value table, AND gate"). However, the states are calculated internally and are taken into consideration when new telegrams arrive.
Negate "Send" and negate "Send by change"
The result of the link is negated. If the result of the link is 1 then a negation is carried out: The result is 0 (zero). If the link result is 0 (zero) then a 1 results from the negation.
Example value table, AND gate
| |
E1 |
E2 |
A1 (send) |
A1 negate (send) |
A2 (send by change) |
A2 negate (send by change) |
Behavior on start of HS
Initial values detected by EIB scan |
1 |
1 |
1 |
0 |
- |
- |
| |
- |
1 |
1 |
0 |
1 |
- |
| |
0 |
- |
0 |
1 |
0 |
1 |
| |
- |
0 |
0 |
1 |
- |
- |
Behavior when output is a 1-bit value
The outputs marked as such convert the value of the output telegram into 0 (zero) or 1. Values not equal to zero are converted to 1 and values equal to zero remain zero.
Telegram interval in the logic module
After sending a telegram via an output, all outputs are locked for this period of time. The time is indicated in seconds. The minimum value is zero. This means that the module has no time-out. This is the standard value of a logic module.
Retentive memory
The following logic modules store their values "non-volatile":
- retentive memory
- operating-hours meter
- counter modules
- as well as all appropriately marked modules in the documentation.
These are once more available after a return of power or a restart of the HomeServer.
 |
Attention |
|
The HomeServer automatically stores these data every 5 minutes (if changed). If a restart is made (e.g. due to power failure) then all data not yet stored are lost!
To bridge this time you can use an uninterruptible power supply (UPS).
|
Behavior in case of 14-byte data type
14-byte text can be used in the module intended for this from Version 2.1.050511. The graphic logic editor prevents an incorrect assignment of the data type to the respective input/output.