Variables andKNX™ group addresses
P.
165 of 349
Read request of a group
address: read()
The read request of the value of an actuator using the corresponding group address from the KNX
TM
bus is realized by means of the
read
function.
Note:
The flag in the ETS program must also be set so that the actuator in the KNX
TM
network responds.
Definition
●
read(
GroupAddress
)
Arguments
●
GroupAddress
: Imported or manual KNX
TM
group address
●
The groupaddress can be optionally negated using the !-Sign.
Effect
●
A valid KNX
TM
telegram with the "read-flag" set is sent to the bus. Confirm, that the actors
are parameterized properly (set read flag).
Data type result (Return)
●
none
Example: Querying the actual temperature from the bus
A temperature sensor can send a temperature value in floating point format f16 (16 bit) to the
address 2/3/4. The bit "read request" is set in the ets, i.e. the temperature can be retrieved via
a read request..
Every day at 18:30 clock and 20 seconds, the variable should be obtained from temperature
sensor.
Implementation:
Temperature='2/3/4'f16
if chtime(18,30,20) then read('2/3/4'f16) endif
By means of the command
Variable = Group address
the information, which is sent to the group
address triggered by the read function, is assigned to a variable.
Overall, the process of the example can be illustrated in Figure 7.
Figure 7: Operation of read
Once the time has been reached 18:30:20,
chtime
goes to ON, the condition of the if statement is
true and the
read
sends the read request. Now the actuator responds and sends the value to the
group address '2/3/4'f16.
Note:
Instead of using
read
(
'2/3/4'f16
) it is possible to code with the invert-sign
read
(!
'2/3/4'f16
).
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - mail@enertex.de
18:30:20
read '2/3/4'
sends '2/3/4'
Actor
Temperature='2/3/4'f16