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

Use of Counters
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Sunday Mar 12th, 2017 08:43 am
   PM  Quote  Reply 
1st Post
slychiu
Administrator


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

  back to top

There are 256 Counters in Comfort Ultra. Each counter can have a value from 0 to 65535 (16 bits)

Counters can be used to count events

eg Zone Response
Increment Counter008
If Counter008 >= 3 Then
   Do Response Turn on Lights
   Set Counter008=0
EndIf

This will increment counter 8 whenever the zone is triggered, when the count reaches 3 it will  Do a Response to turn on selected lights, and reset the counter to 0

You can also Add a counter value or subtract a counter value

eg
Get Counter 5
Subtract Counter 6
Set Counter 7


This means Counter 5 - counter 6
The result is saved to another counter 7


Counters can also be used for Feedback in the Control Menu



Note that The Counter Menu does not need any words in OFF and ON action keys


In the Comfort App, counter as feedback will appear as a Slider

The slider positions correspond to counter values 0 for off (slider to the left) and 255 for full scale. the scale 0 to 255 corresponds to dimming levels for most lighting systems



Last edited on Monday Mar 13th, 2017 11:28 am by slychiu



 Posted: Sunday Mar 19th, 2017 06:29 am
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


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

  back to top

Counters can also be used as a Link between different systems

For example, for UCM/KNX, KNX Group addresses can be mapped to Counter numbers. of the same Counter is mapped to UCM/Cbus, or UCM/Zwave, or IRIO functions, then if one device changes the value of the linked counter, then the other devices mapped to the same counter are also controlled by the counter value

In the example below, KNX group address 0/0/5 is mapped to a Counter in Comfort

When the KNX group 0/0/5 changes its value, eg 0 to 155,  this value is saved in the mapped Counter

Also if the counter value is changed in Comfort by a Response or from other systems, the updated value is sent to the mapped KNX group address, si it is a 2 way link




If another UCM eg Modbus element is mapped to the same Counter, then that allows one UCM to send commands to the other extrenal device and vice versa, or Comfort can control both devices by changing the counter value



Last edited on Friday Apr 14th, 2017 07:02 am by slychiu



 Posted: Friday Apr 14th, 2017 06:38 am
   PM  Quote  Reply 
3rd Post
slychiu
Administrator


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

  back to top

The value of Counters can be viewed  and the value can be changed in Comfigurator

Go to Events > Counters in Comfigurator
Select the Counter on the middle pane
check the "Show Status" box for the counter in the right pane
The value of the Counter is seen in the Status field
To change the Counter value, enter the new value in the status field





Related Topics - Use of Counters, Flags, Outputs, Sensors http://www.comfortforums.com/forum126/4677.html

Last edited on Friday Apr 14th, 2017 06:41 am by slychiu



 Current time is 12:50 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems