Programming - First steps
P.
51 of 349
The Enertex
®
EibPC is a state
memory. All telegrams are internally
stored and thus a process image is
created.
This program is not inherently flawed, but it will work differently than you might have thought. The
Enertex
®
EibPC processes only expressions which change. Therefore, it remembers the last state,
which was sent via a group address. If an ON was sent at the group address "ReleaseSwitch-1/0/1"
OFF recently exhibiting the value OFF, the inner if statement is evaluated exactly once. Thus, in this
case, the lamp and the dimmer are switched on or off, whichever value was sent via the group
address "Switch-1/0/0". If now - "ReleaseSwitch-1/0/1" is still ON - the group address "Switch-1/0/0"
changes, no further telegram is triggered, because the condition of the outer if-statement does not
change (also see comments on page 43).
The mapping of states of received telegrams is called validation scheme. It makes the operation and
programming easy and intuitive, as long as the nesting of if statements is avoided. As shown in the
example, this prevention is always simply possible.
We advise beginners to avoid nested if-statements.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]