Logic Operations
Logic Operations
KNX Association
KNX ADVANCED COURSE
Table of Contents
1 Introduction ............................................................................................................. 3
2 Logical Connection of Group objects .................................................................... 3
2.1 Switch Actuator (Binary Output) with Logic Function .................................. 3
2.1.1 Group object - Switch .................................................................................... 3
2.1.2 Group object - Logic ...................................................................................... 3
2.1.3 OR Function with ON/OFF Delay ................................................................... 5
2.1.4 AND Function ................................................................................................ 8
2.1.5 Extended Logic (Direct Relay Control) ..........................................................11
2.1.6 Extended Logic (Object Logic Output) ..........................................................12
3 Logical Connection of Group Addresses .............................................................13
3.1 Logic Module ..................................................................................................13
3.1.1 Problematic Situations ..................................................................................13
3.1.2 Available Parameter Settings of Logic Modules ............................................14
4 Extensive Logical Connection of Group Addresses............................................24
4.1 Application Unit (Example) ............................................................................24
4.2 Graphical Project Design in a Logic Diagram ..............................................25
5 Tasks.......................................................................................................................26
5.1 Linking Actuator Objects ...............................................................................26
5.1.1 OR function without time delay or with ON and OFF delay ...........................26
5.1.2 Example: Automatic Room Air Conditioning with Enabling (AND function) ...26
5.1.3 AND Function without time delay and with ON/OFF Delay ...........................27
Test the function of the following sequences: ...........................................................27
5.1.4 Linking Group Addresses (1) – Logic Module or Switch Actuator “Extended
Logic” .....................................................................................................................27
5.1.5 Linking Group Addresses (2) – Graphical Project Design (Application
Module) ....................................................................................................................27
6 Logic Operations (Appendix) ................................................................................28
6.1 Basic Functions and Elements ......................................................................28
6.1.1 AND Function (Conjunction) and AND Element (AND) .................................28
6.1.2 OR Function (Disjunction) and OR Element (OR) .........................................30
6.1.3 Negation and NOT Element (NOT) ...............................................................32
6.2 Compound Elements......................................................................................33
6.2.1 NAND Element (NAND) ................................................................................33
6.2.2 NOR Element (NOR) ....................................................................................34
6.2.3 EQUIVALENCE Element ..............................................................................35
6.2.4 EXCLUSIVE OR Element (XOR) ..................................................................36
1 Introduction
A large number of functions in building control systems cannot be traced back to a single
circumstance. Functions or states of devices or circuits are frequently made dependent on
several conditions.
The logic operation of the various trigger factors can be implemented in various ways in a
KNX system. Different solutions can lead to the objective depending on the type and
number of the required conditions.
The KNX components that are available on the market from various manufacturers
provide a range of variants which enable frequently requested logic operations to be
implemented. The group objects and parameter settings of these devices use the basic
principles of digital technology.
The basic functions of the logic operations and some compound elements are explained
in an appendix at the end of the chapter.
Via the function Logic operation/Logic, it is possible to link the switching of the output with
specific conditions. The following can be selected:
AND function
OR function
XOR function
Gate function
Figure 2: Functional diagram of the logic operations e.g. 4-fold switch actuator
Two logic objects are available: the Switch group object is first of all evaluated with the
Logic operation 1 group object. The result is linked with the Logic operation 2 group
object.
The activation of the logic function means that the switch object of the respective channel
(output) interacts with the logic objects of the associated channel (output).
Figure 3: Parameter window for logic operation (extract) e.g. 8-fold switch actuator
In addition to activating the logic operation, the ON/OFF delay can also be used.
Several alternatives can be selected here which the delays have an effect on.
Figure 4: Parameter window for ON/OFF delay (extract) e.g. 8-gang switch actuator
It should be noted that the ON/OFF delay does not affect the logic object.
It is therefore possible to switch circuits for specific applications directly (via logic objects)
and with a time delay (via switch objects).
Case 1: The actuator follows the ON and OFF signals that are active in the switch
object.
Case 2: The actuator follows the ON and OFF signals that are active in the logic
object.
Case 3: If the signals of the switch object and the logic object intersect each other,
the output is switched on by the first ON signal and switched off by the last
OFF signal sent.
Case 1: The output switches on once the ON delay has elapsed. The OFF period
starts when the OFF command has been sent and the output switches off
once it has elapsed.
Case 2: As the logic object is operating without a delay, the output is switched directly
by ON and OFF signals from the logic object.
Case 3: If the logic object receives an ON command while the ON delay of the switch
object is active, the output is switched on. If the switch object and the logic
object receive an OFF signal, the output is switched off once the OFF delay
has elapsed.
If the logic object only receives an OFF signal once the OFF delay of the
switch object has elapsed, the output is switched off by this OFF signal (not
shown).
Note: When using an AND function, it should be ensured that an AND condition which
has been caused by a physical variable (e.g. temperature or brightness) is not reset by a
manual operation (e.g. "Central OFF"). This problem can likewise be solved by the cyclical
sending of a signal.
Case 1: The ON signal in the switch object sets a marker. The output is only switched
on when the logic object receives a ‘1’. If a ‘0’ is sent to the logic object, the
output switches off.
Case 2: The ON signal in the logic object sets a marker. The output is only switched on
when the switch object receives a ‘1’. If a ‘0’ is sent to the logic object, the
output switches off. If the switch object receives a ‘0’ as useful data before the
logic object, the AND condition is no longer met and the output is switched off.
The ON and OFF delay and their effect on the switch object are defined in the following
parameter window of the 8-fold switch actuator which has been selected as an example.
Figure 8: Parameter for effect of the ON/OFF delay (extract) e.g. 8-fold switch actuator
Simple logic gates can be implemented with the logic function. The following objects are
available as input objects per channel: – Switch Object Channel X – Staircase Lighting
Object Channel X – Logic Object A Channel X. The output of the logic function can only
be processed internally in the switch actuator; that means that the logic result is routed to
the relay of the respective channel and not sent on the bus.
The input objects “Switch object” and “Staircase lighting object” are always interconnected
with an OR gate for the basic logic function. The output of this OR gate leads to a freely
configurable gate: AND, OR, XOR. The following diagram shows a logic operation with an
AND function.
Case 1: An ON signal has been sent to the logic object. The switch object likewise
receives a ‘1’ as useful data. The output is switched on once the set ON delay
(te) has elapsed. A ‘0’ in the switch object starts the OFF delay (t a). The output
switches off once the delay period has elapsed.
Case 2: A ‘1’ is sent to the switch object as useful data. If a ‘1’ is sent to the logic
object during the set ON period, the output is switched on once the ON delay
of the switch object has elapsed. A ‘0’ in the switch object starts the OFF delay
(ta). If the logic object receives a ‘0’ during the OFF delay, the output is
switched off directly.
Summary: To use the ON and OFF delays fully, the logic object must receive a ‘1’ as a
useful signal before the switch object and may only be deactivated by a ‘0’
once the OFF delay has elapsed (t a).
Figure 11: Parameters for "Extended Logic" (controls relay directly) – 8-fold switch actuator
When using the “Extended Logic” function, the logic objects of the respective channels are
queried depending on the parameterisation of the possible logic gates e.g. AND function)
and the result is transferred “internally” to the relay output (Logic Output Channel X). The
standard switch object of the respective output (channel) no longer has a function (still
shown).
Figure 12: Group objects for "Extended Logic" (controls relay directly) – 8-fold switch
actuator
Figure 13: Parameters for "Extended Logic" (Object Logic Output) – 8-fold switch actuator
Different gate functions can be used and connected with each other. The result of the gate
function is then sent as a group address on the bus via the group object "Logic Output"
(parameter line: “Time 1 Output” “Object Logic Output”).
“Gate functions” and “Filters” can be activated for technical processes.
The standard switch object of the respective output (channel) no longer has a function
(still shown).
Figure 14: Group objects for "Extended Logic" (Object Logic Output) – 8-fold switch
actuator
The following applies to all the parameter windows and functions of the selected logic
module:
Behaviour of the inputs
After receipt of a telegram, all the inputs first save the values in order to make them
available (e.g. for logic functions) for further processing. When a new telegram reaches
the input, the values are overwritten accordingly.
Disable objects
Disable objects always block the function on receipt of an ON telegram at the group object
“xx Disable xx”. On receipt of an OFF telegram at the group object “xx Disable xx”, the
function is enabled.
Send delay
The send delay indicates how long the logic module waits (depending on the
parameterised send condition), before it sends a new value as an output telegram.
Cyclical sending
Some functions of the logic module enable the cyclical sending of an output value. The set
cycle is then maintained until an output value changes. When a value is changed, the
output is immediately sent and the next sending cycle is started.
Data types and datapoint types (DPT)
Different datatypes can be selected for some functions of the logic module. The datapoint
type (DPT - Interworking Standard) is applied where applicable.
The Format Converter function breaks down an input telegram into several output
telegram of a different format or generates an output telegram from several input
telegrams of another format. That means that telegrams are broken down or put together
at format level. No specific datapoint type (DTP) can therefore be assigned to the input
and output objects. An assignment between the object and a datapoint type (DTP) arises
due to the context of the ETS project in which this function is used.
In the event of bus voltage failure or when the logic module is reprogrammed, the input
values are not saved.
Each threshold value function makes 2 independent threshold values available which can
be parameterised in the lines Threshold Value 1 (or 2). The datapoint types available for
selection are shown in the diagram.
3.1.2.5 Scenes
If Scenes is selected as a function in the General window, further lines appear in the ETS
parameter window. The function is always prefixed with the name of the line for which the
scenes has been selected (e.g. A – Scenes Common).
Scenes are used to retrieve default settings. There are e.g. 6 group objects available as
outputs. The data type is defined once for each output. Different values can then be
assigned to these outputs in each scene.
A scene for a cosy evening by the fire can be defined in a lounge. If this scene is retrieved
via a bus telegram, the preset values for the scene are sent on the bus to the actuators as
telegrams. A standard lamp can thus for example be switched on, the ceiling lighting
dimmed to 10 % and the heating setpoint lowered to 19 °C.
3.1.2.7 Gate
If Gate/Filter is selected in the General window, 2 lines appear in the ETS parameter
window, each with a gate/filter.
The filter function enables the filtering out of telegrams. Telegrams can be routed or
blocked with a gate depending on a set condition.
Note: The gate/filter functions operates at the format level of telegrams (e.g. 1 bit,
1 byte, 2 byte) and not on datapoint types (EIS type). An assignment between the object
and a datapoint type is only carried out due to the context of the ETS project in which this
function is used.
3.1.2.9 Multiplier
If Multiplier is selected in the General parameter window, 2 lines appear in the ETS
parameter window.
The multiplier can be used to pass on several telegrams to the output on receipt of a
telegram at the input. The output telegrams can be four 1 bit and/or four 1 byte telegrams.
With the parameter Reaction of the 1-Byte output x, it is defined how a binary output of the
multiplier should behave. The option as input telegram corresponds to the function of the
simple multiplier. The outputs can however also be inverted or only react to a telegram.
For example, the option send if ON causes a telegram to be sent to the input while an
OFF telegram causes no reaction at the output.
The group objects (example} show that a 1 bit input address can send four 1-bit output
addresses and one 1-byte output address on the bus.
3.1.2.11 Counter
If the Counter function is selected in the General window, a line appears in the ETS
parameter window with the name of the selected function.
The counter is a telegram counter. Group address telegrams from sensors and actuators
can thus be counted. The counter can register a telegram max. every 30 ms (corresponds
to 33 Hz).
Notes: .................................................................................................................................
............................................................................................................................................
............................................................................................................................................
The project design and commissioning of the logic functions of an application unit mainly
take place directly in ETS.
The assignment of parameters is carried out in a graphical logic diagram which is opened
for example via the "Parameters..." button. This is where the logic functions, the inputs
and outputs as well as the connections are created and the parameters of the functions
are edited.
Pull
The configuration of the logic functions is carried out in the ‘Project Design’ module of
ETS and represented in a graphical logic diagram based on DIN 40900.
Notes: ..............................................................................................................
.........................................................................................................................
.........................................................................................................................
.........................................................................................................................
5 Tasks
The following tasks are recommended for the previous explanations.
The tasks can be adapted accordingly dependent on the available KNX components.
5.1.2 Example: Automatic Room Air Conditioning with Enabling (AND function)
Assign a switch sensor the task of switching a room air conditioner via a switch actuator.
The room contains a room thermostat with two-step control and bus capability.
Alternatively, a conventional room thermostat can be given bus capability via a binary
input.
Assign the parameters so that the thermostat regulates the room temperature via the
switch object and the switch sensor enables or disables the closed-loop control via the
logic object (AND function).
Create the necessary group addresses as main and middle groups.
Create the required subgroups, e.g.
35 = Thermostat for cooling room xx
36 = Switch sensor for cooling room xx
and link these addresses with the relevant objects.
Transfer the modified information into the devices and test the function.
Configure a Central OFF function and extend this to the devices for air conditioning.
Link the Central OFF group address with the switch object and test the function.
Link the Central OFF group address with the logic object and test the function.
Summary: If group addresses with the value ‘1’ which have been generated by physical
processes are not permitted to be reset by a central ‘OFF’ command, the
group address is sent cyclically.
5.1.3 AND Function without time delay and with ON/OFF Delay
Configure a 4-fold switch actuator and activate the AND function in the parameters of the
channel.
5.1.4 Linking Group Addresses (1) – Logic Module or Switch Actuator “Extended
Logic”
The KNX system is used in a school building for signal and monitoring functions. The
following additions should increase the security of the building:
The message ‘Window open’ should be extended into an alarm signal (protection
against danger) at a particular time of day and routed to the technical supervisor
(caretaker).
The group address for the message ‘Window open’ is e.g. linked in a logic module as an
input address to a second group address for ‘Alarm duration’ using an AND function to
form a new output group address ‘ALARM – Window open’.
Figure 35: Truth table and circuit diagram of an AND function and an AND element
An electronic circuit in which only a ‘1’ state is present at output X when ‘1’ states are
present at input A and at input B, is called AND, an AND element or an AND gate.
An AND element can be implemented by a circuit diagram. Nowadays however integrated
semiconductor circuits are used almost exclusively.
Any circuit that fulfils the truth table of an AND function is an AND element.
The AND function can be expressed mathematically with the help of logic algebra:
The diagram shows the graphical symbol of an AND element with two inputs. The
designations of the inputs and the output can be freely selected. I1, I2 is often used for the
inputs and O for the outputs.
The ‘1’ state is only present at the output of an AND element if there is also a
‘1’ state at all the inputs.
OR
A B X
0 0 0 A B
0 1 1
1 0 1 X
1 1 1
The represented circuit is only used for clarification. OR elements are nowadays almost
exclusively configured as integrated semiconductor circuits.
The OR function can likewise be expressed mathematically with the help of logic algebra:
The information in the standardised graphical symbol 1 means that the number of ‘1’
states at the inputs must be 1 if there should be a ‘1’ at the output.
The designations of the inputs and the output can be freely selected. I1, I2 is often used
for the inputs and O for the outputs.
The ‘1’ state is always present at the output of an OR element if there is a ‘1’
state at one of the inputs at least.
Figure 39: Truth table, circuit and graphical symbol (standardised) of a negation or a NOT
element
A NOT element can be structured according to the circuit diagram. It must again be noted
that NOT elements are usually configured in semiconductor technology.
Any circuit that meets the truth table of a negation is a NOT element.
The negation can also be expressed mathematically with the help of logic algebra.
The state at the output of a NOT element is always the opposite of the state
at the input.
Figure 40: Origination of the NAND function with truth table of the circuit
NAND elements are used very frequently. Unique graphical symbols have been
developed for them.
Figure 41: Truth table and graphical symbol of the NAND element with 2 inputs
The graphical symbol is produced from the symbol of the AND element with a circle at the
output. This circle denotes the negation of the output.
The following sentence applies for the logic operation of the NAND element:
A ‘1’ state is present at the output of a NAND element if a ‘1’ state is not
present at all the inputs.
Z= A^B
The long line above the AND function of A and B indicates that the complete AND function
has been negated.
Figure 42: Origination of a NOR element with truth table of the circuit and graphical symbol
(standardised)
Z indicate the negated OR function. The designation NOR is formed from the English
expression NOT OR (NICHT-ODER). There is no German equivalent for NOR.
NOR elements are used as frequently as NAND elements. There is therefore a separate
graphical symbol (diagram) for NOR elements. The symbol is produced from the symbol
of the OR element. The negation is shown by a circle at the output.
The following sentence applies for the logic operation of the NOR element:
A ‘1’ state only lies at the output of a NOR element if the ‘1’ state is not
present at any of the inputs.
The following algebraic equation applies for the NOR function:
Z= AvB
Figure 43: Graphical symbol of the EQUIVALENCE element with truth table
EQUIVALENCE elements also have their own graphical symbol. Diagram 2.9 shows the
symbol and the truth table.
The algebraic equation for the EQUIVALENCE function has the following format:
Z = (A ^ B) v (A ^ B)
If the output of the EQUIVALENCE element is negated by the series connection of a NOT
element, an element is created that always has the ‘1’ state at the output if the input states
are different.
This type of element is called EXCLUSIVE OR (= unequal value). The name suggests that
this element is an OR element in which case it is not possible to have a ‘1’ state at the
output if both inputs have a ‘1’ state (Case 4). The designation XOR was formed from the
English expression EXCLUSIVE OR.
Figure 44: Origination of an EXCLUSIVE OR element with truth table and graphical symbol
(standardised)
The ‘1’ state is then always present at the output of an EXCLUSIVE OR element if the two
inputs have different states.
An algebraic equation for EXCLUSIVE OR can be taken in the following format from the
circuit in Diagram 6.10:
X = (A ^ B) v (A ^ B)
This expression is not fully negated since the NOT element is series-connected. The
following equation is produced for EXCLUSIVE OR:
Z = (A ^ B) v (A ^ B)