Variables andKNX™ group addresses
P.
166 of 349
Initialize Groupaddresses
Using the [InitGA] Section
Before the Enertex
®
EibPC starts processing the user program, the user might want to initialize the
images of the group addresses. The Enertex
®
EibPC always saves the current state of the contents
of the group addresses as a kind of image in memory (see also
gaimage
() on p. 234). If started all
group address images are set to 0, but as the KNX Bus is already running before the EibPC starts
with processing, theses memory images will not hold the real state if they are different form zero
(which will be most likely the case).
In order to synchronize with the KNX bus, some Group addresses have to be read by the EibPC.
You can achieve this by using the section [
InitGA
] as follows:
Example
[InitGA]
// Temperature manually defined
'2/3/4'f16
“Heating-2/3/4”
“Lights-2/3/2”
[EibPC]
if “Lights-2/3/2” and '2/3/4'f16<10.0 then write(“Heating-2/3/4”,100%) endif
Notes
•
You can use the context menu on the group address windows to enable initializing a
group address
•
You can easily write any valid group address in this section. If you use manually defined
group addresses (as '2/3/4'f16 above), this group address must be really used at least
once in your user program
•
Initializing the group addresses means, the EibPC sends read telegrams to the group
addresses. Each Groupaddress will be sent after waiting for a response with a timeout of
1500 ms.
•
After the last read telegram is initiated, the EibPC starts processing the user program.
•
All statements which include a group addresses listed in the section [InitGA] are invalid
and therefore run at systemstart.
•
If a group address is not responding to initGA, an event is generated.
Example 2
[InitGA]
“Lights-2/3/2”
[EibPC]
if “Lights-2/3/2” write(“Heating-2/3/4”,100%) endif
if !“Lights-2/3/2” write(“Heating-2/3/4”,0%) endif
Normally, on systemstart each instruction is set to valid.
So neither this
if “Lights-2/3/2” write(“Heating-2/3/4”,100%) endif
nor that
if !“Lights-2/3/2” write(“Heating-2/3/4”,0%) endif
is running.
Through the use of [InitGA] all group addresses listed in this section are invalid an therefore run at
system start.
In the example above is written to the GA „Lights-2/3/2“ a read request. Depending on the
answer is either the first or second statement executed.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]