Variables andKNX™ group addresses
P.
168 of 349
Bus-Activity:
Event
This function always responds when a telegram is written for the monitored address on the bus. It
does not respond to variables.
In connection with UDP, TCPIP or RS232 telegrams, it reacts identically to the arrival of UDP
messages (see page 235 and page 64, respectively) in the step-by-step introduction.
An event function is defined as follows:
Definition
●
Function
event
(
Group address
)
Arguments
●
Group address
: Imported or manual KNX
TM
group address
●
The groupaddress can be optionally negated using the !-Sign.
●
For UDP, TCPIP or RS232 telegrams (see page 135) the event function can be applied to
the function
readudp
.
Effect
●
Return value: 1b01 (ON pulse) when a telegram with the group address is on the KNX
TM
bus, regardless of its content.
t
t
Group address
event(
Group address
)
ON
OFF
ON
OFF
ON
Data type results (Return value)
●
Data type b01
One special characteristic of the event functions is that this function may not be placed at if
statements with else-branch. The event-function is only switched to ON for one processing cycle and
will be execute the then-branch of the if-statement on the arrival of a telegram to the group address.
In the next cycle, event returns to OFF and now the else branch is executed. To simplify
programming, here the use of the event function is limited by the compiler (see page 43).
An example of using the event function.
Whenever the address "MotionDetector-3/2/3" or "MotionDetector-3/2/4" gets an event, the
variable light is set to ON. After 3 minutes, the variable light should be reset to OFF.
The reaction is then:
if (event(“MotionDetector-3/2/3“)) or (event(!“MotionDetector-3/2/4“)) then Light=EIN endif
if(after(Light,30000u64)==EIN) then Light=AUS endif
The monitoring of bus activity to a group address will be realized with the help of the
event
function.
For deeper analysis of the KNX telegrams the event-Functions described on the next pages can
distinguish
1.
a normal write,
2.
a read
3.
a response to a preceeding read.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]