0
Answered

Randomizing schedule

Anders Gustavsson Gustavsson 4 years ago in bOS Configurator / Tasks updated by Daniel Czibolya 6 months ago 2

Hi,

I was wondering if there is a good way to randomize when a schedule is turned on and turned of.

I.e. today I have a plc-based function which turns on a switch sometime between 9 and 10 pm and turns it off sometime between 11.30 and 11.50 pm. Thus making the on/off randomized between a set time frame.

I'd appreciate any help in getting this to work.

Thanks

Anders

GOOD, I'M SATISFIED
Satisfaction mark by Anders Gustavsson Gustavsson 4 years ago
Answered

Hello,

you could still use schedule to trigger some Program task. In that program task you can write a program which takes a random delay. e.g. you could create a Calculation task (RandomDelay) where you would calculate your random value with several different variables such as (outside temp., inside temperature, power meassurement, etc.) then you would use this variable for your delay. So the idea is, that your Schedule would trigger Program task at 9:00, Program task would start and wait for x seconds based on your calculated delay, then it would turn on the switch. The same thing you would do to turn it back off.

That is one quick idea, maybe someone else on the forum can give you another one.


Regards

Hello, 

" you could create a Calculation task (RandomDelay) where you would calculate your random value with several different variables such as (outside temp., inside temperature, power meassurement, etc.) then you would use this variable for your delay."

This is the only way, to generate random numbers? Could the random function be added to the list?