<a href=showthread.php?s=&postid=12736574#post12736574 target=_blank>Originally posted</a> by kenargo
Max Change is not active for power failures. The 'If Power' statement controls when power is lost as follows:
If power 005 then PM1 OFF
The above example will keep PM1 OFF for 5 minutes after power is restored.
I think this is what you want to use.
Max Change controls a device when the program is running; it prevents a device from being changed for the specified amount of time. For example:
Max Change 005 M Then PM1 OFF
If PM1 is turned off, as a result of another program condition then the above code will not allow PM1 to turn back on (it will keep the PM1 OFF) for 5 minutes, even if the program tries to turn it on.
Hope this makes sense....
Okay so the following will first send an alarm that the power went out (i have two ac adapters, one in the wall and one to a ups).
Then it will shut all lights off. Then at 5 min intervals it will turn the lights on in order. 5 lt1, 10 lt2, 5 lt3, 10, lt4 15 lt5.
This all is subject to the timers being 'on' for those lights based on time of day.
If Power 000 Then ALM ON
If Power 000 Then LT1 OFF
If Power 000 Then LT2 OFF
If Power 000 Then LT3 OFF
If Power 000 Then LT4 OFF
If Power 000 Then LT5 OFF
If Power 005 Then LT1 OFF
If Power 010 Then LT2 OFF
If Power 005 Then LT3 OFF
If Power 010 Then LT4 OFF
If Power 015 Then LT5 OFF