Need some Apex Programming Help

LOTUS50GOD

Active member
I am trying to automate my top off

I want the fresh water top off to only come on if:
1. The float switch is open
2. The PH is over 8.2
3. If the time is between 8:00 and 8:01.

Only if all three parameters are yes do I want to turn on the pump.
** Incase you were wondering the time parameter, this is so I don't over fill the tank in case of switch failure. I also have a 1 gallon tank for fresh water, so this is so I don't burn out the pump when it drains.

Here is my code that does not work
Fallback OFF
Set OFF
If Switch1 CLOSED Then OFF
If Temp > 08.30 Then ON
If Time 08:00 to 08:01 Then ON



if I move the statement for the switch.. will this work
Fallback OFF
Set OFF

If Temp > 08.30 Then ON
If Time 08:00 to 08:01 Then ON
If Switch1 CLOSED Then OFF
 
The general approach is to first set the nominal condition, and then set the exceptions. Try:

Fallback OFF
Set OFF
If Time 08:00 to 08:01 Then ON
If Switch1 CLOSED Then OFF
If pH < 08.20 Then OFF

Also, watch for the parsing bug that is in 4.04BC10. When you enter 'pH', it later gets changed to 'Temp'. Try entering it as lowercase 'ph', update, switch to another outlet, and then back to verify.

Todd
 
Another thing I forgot to mention. The If Time 8:00 to 8:01 Then... will actually create a 2 minute run time rather than 1 minute. It has to do with the fact that the command ignores seconds, so 8:01:59 is treated the same as 8:01:00. If you need an exact 1 minute interval, add 'Defer 1:00 Then ON' to the end, this will effectively deduct a minute from the duration.

Todd
 
Back
Top