Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

KNX/Logic Example
 Moderated by: admin
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday May 21st, 2023 03:37 am
   PM  Quote  Reply 
1st Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5596
Status: 
Offline

  back to top

This example shows how KNX/Logic can implement Logic conditions with If/Then/Else actions more easily than using other KNX logic products. 
This requirement is for a public toilet in a large public building eg Railway or Airport. A KNX Human Presence Counter is installed (eg https://www.steinel.de/en/sensors-professional/products/products/sensors/presence-detectors/hpd2-033200.html ), to count the number of people in the male and female toilets. The logic required is as in the flowchart below. Basically, the Fan speed is determined by the number of people detected. if the number is >5, the fan speed goes from low to medium, and if >10 the speed goes to High immediately. However if the people counted is less than 9, the fan speed goes from High to Medium after some time eg 15 minutes and if the people detected is less than 5, the fan speed goes from medium to low after eg 15 minutes. The purpose is for  energy saving for a facility that is open 24 hours a day 7 days  a week. This system is implemented in all the toilets in the facility, thus can result in significant energy saving in the building or buildings. 



Another requirement not mentioned above is that the maximum counter of the Male and Female Toilets is used in the logic, so the logic uses the larger number based on the 2 toilets in its determination of fan speed

In Comfigurator, go Modules Tab > Controller, and the right pane with KNX/Logic Properties. Select KNX > Comfort Tab as shown below.
Add the 3 KNX objects; 1 byte Scaling Values (EIS6).
0/0/2 is the Fan speed.  Map to Counter 17
0/0/15 is the 1st Toilet People Count. Map to Counter 15
0/0/16 is the 2nd Toilet People count. Map to Counter 16

Each KNX object is mapped to a Counter Register in this program. Counters are 16 bit registers in Comfort which hold values and can execute Responses, or Programs based on the counter value.





In the Counters screen below, each Counter can be assigned to a Response or program in Comfort. This allows the Response to perform logic on the counter based on the Value in the counter. Counters 15 and 16 are both assigned to the same Response.




The Response assigned to the counter is programmed in the Responses Screen (Events > Responses)




The Responses consists of Actions, The text of the Response is duplicated below:

If Counter Counter015 >= 10 Or Counter Counter016 >= 10 Then
    Set Counter017(17) = 255
    Stop Timer Timer01(1)
    Exit Response
Else
    Do Medium After 10 Seconds Using Timer01(1)
End If
If Counter Counter015 >= 5 Or Counter Counter016 >= 5 Then
    If Counter Counter017 = 255 Then
        Do Medium After 10 Seconds Using Timer01(1)
    Else
        Do Medium
        Stop Timer Timer01(1)
    End If
Else
    If Counter Counter017 = 255 Then
        Do Medium After 10 Seconds Using Timer01(1)
    Else
        Do LOWFAN After 10 Seconds Using Timer01(1)
    End If
End If

Do Medium means Do the Medium response which sets fan speed to Medium Value.
Do LOWFAN means Do the LOWFAN Response which sets the fan speed to Low.

Timers (max 32 timers) can also be used to implement delays between actions. 
Do LOWFAN After 10 Seconds Using Timer01(1) means delay for 10 seconds then do LOWFAN.. 10 second delay is used for testing so that we do not have to wait so long to test. When testing is completed, the delays can be increased to say 15 minutes.
Stop Timer means stop the timer to prevent the target Response from executing.



Last edited on Tuesday May 23rd, 2023 01:52 am by slychiu



 Posted: Sunday May 21st, 2023 05:08 am
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5596
Status: 
Offline

  back to top

For Responses, select the Actions required to perform the logic. You select from a drop-down list of actions as shown below;




There are also If/Then/Else conditions as shown below;




Note that programing of KNX/Logic is by using Comfigurator, NOT ETS. ETS does not allow the flexibility of Counters, Sensors, Responses and Acrtions that is needed to implement complex Logic



Last edited on Sunday May 21st, 2023 05:14 am by slychiu



 Posted: Tuesday May 23rd, 2023 01:56 am
   PM  Quote  Reply 
3rd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5596
Status: 
Offline

  back to top

The KNX/Logic Processsor can be expanded with optional modules like UCM/Modbus (Modbus Interface), IRIO (Input/Output Modules with plugin submodules), UCM/USB, UCM/Ethernet, UCM/Wifi, HIO (Hotel IO Module), UCM/Cbus etc



 Current time is 07:12 am
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems