0

how to create a while loop

Gruyère Energie SA 5 years ago in bOS Configurator updated by Kristián Vojčík 5 years ago 6

I would like increment value until the knx switch are pressed. 

I think use the program fonction but I dont' know how to create a quick while loop ?

Not sure to understand how you want to have the value increment... can you explain ? To reset the value through the knx switch will be the easiest 

Yes I'm not very clear. 

When long press the switch it send value 1 on knx for trigering the program and increment another knx value while the switch remains pressed. 

When switch release it send 0 and stop program. 


Can you provide more details : "increment another knx value while the switch remains pressed". Is is via a formula, is it simply an knx value update based on the knx actor value change, knx vlue increament by X every Y seconds...

The increment are with formula for exemple and the increment time maybe under 1 sec. My basic question are how to create a while fonction, because is not implemented yet. 

Ok, got it..

The best is to put your switch as a trigger of your program at status change and set is to allow retrigger. set the program to restart a retrigger. You should then be able to manage with "if" and "else".... if switch status = 1 do XXX and switch status = 0 stop program (or use the abort commands section).

Hope this helps.

You also can do "if" check to see if the button is pressed and than do small delay and increment counter and than restart function. That will be looping until you release button.