Apex Delay Help

EricTMah

Aquariums by Design
Joined
Mar 2, 2014
Location
Kitchener, Ontario
Website
www.aquariumsbydesign.ca
Hey Apex Gurus

I am trying to program a delay if power is cut to either the main Apex or just my EB8

I've tried both these lines of code and no delay:

If Power Apex OFF 001 Then on
If Power EB8_3 OFF 001 Then on

Both seem to be accepted by the apex, but do not delay!

The two lines prior to the above are:
1-Fallback on
2-Set on

Any suggestions or ideas?

Thanks
 

Nonuser

Distinguished Member
Joined
Mar 17, 2015
Location
Brantford
There should be a sleep function or you require a counter or call function to the clock and then loop until time has past.
Quick search seems you do this

Fallback ON
Set ON
If Outlet Leak_detect = ON Then OFF
If Outlet ATO_ON = ON Then OFF
If Outlet Return = OFF Then OFF
If FeedA 000 Then OFF
If FeedD 000 Then OFF
Defer 005:00 Then ON ---- looks like a defer command and 5 minute delay?
 

Nonuser

Distinguished Member
Joined
Mar 17, 2015
Location
Brantford
public static sleep(Long milliSeconds)
{
Long timeDiff = 0;
DateTime firstTime = System.now();
do
{
timeDiff = System.now().getTime() - firstTime.getTime();
}
while(timeDiff <= milliSeconds);
}


Sleep function using system time, Man the old programming memories....
 

TORX

Administrator
Staff member
Website Admin
Joined
Nov 27, 2010
Location
Blenheim, Ontario
Website
www.thefragtank.ca
It is stupid Apex logic, switch the last word to OFF

If Power Apex OFF 001 Then OFF
If Power EB8_3 OFF 001 Then OFF

Here is my skimmer code.

Fallback OFF
Set ON
If Outlet RtnPump = OFF Then OFF
If Power Apex Off 005 Then OFF
Defer 005:00 Then ON
 

TORX

Administrator
Staff member
Website Admin
Joined
Nov 27, 2010
Location
Blenheim, Ontario
Website
www.thefragtank.ca
YOU DA MAN!!!

Works like a charm. Thanks buddy :)
a319e492b50e7a74847b55fd93977f5d.jpg


Sent from my SM-G925W8 using Tapatalk
 
Top