View Single Post
Old 12/28/2007, 11:49 PM   #7
Premium Member
kenargo's Avatar
Join Date: Jan 2007
Location: Redmond, WA
Posts: 8,151
Following a thread on this issue I thought it good to add here....

Be sure to use "If Time > 00:00 Then XXX ON/OFF" correctly.

It is very easy to get carried away and use the "If Time" statement to rid your display of "U"s but this may not always produce the output you expect. The following example is a case when you should NOT use the "If Time" statement:

If PH > 7.0 Then CO2 ON // CO2 ON when PH > 7.0
If PH < 6.5 Then CO2 OFF // CO2 stays ON until PH < 6.5


If Temp > 79.0 Then COL ON // COL ON when Temp > 79.0
If Temp < 78.0 Then COL OFF // COL stays ON until Temp < 78.0


If ORP < 300 Then OZN ON
If ORP > 350 Then OZN OFF

(I think you should get the idea by now).

You may be thinking, why can't you use the "If Timer" to initialize CO2, COL and OZN, after all you will get a "U" if the AC3 is updated and the values fall in the middle of the ranges and the timer might be ON or OFF and I won't know.

To understand this we need to walk through the logic, placing the initializer there to see why it causes problems...

Let's take one:

If Time > 00:00 Then COL OFF // Init COL to OFF
If Temp > 79.0 Then COL ON // COL ON when Temp > 79
If Temp < 78.0 Then COL OFF // COL OFF when Temp < 78

Hmm, looks like it will work, right.....

What will happen in the above is that the COL will turn on when Temp > 79.0 but it will turn off when the Temp drops to 79.0; it wil not stay on until Temp < 78.0. Do you see why, I'll explain...

The "If Time" initializes COL to "OFF" and this happens for each evaluation cycle. Next the Temp is tested and if it is 79.1 (which is greater than 79.0) the COL os turned ON (great, just what I wanted). Next evaluation the COL if initialized to "OFF" and the Temp has dropped to 79.0 and since 79.0 is not > 79.0 COL state remains unchanged (OFF, set by the "If Time") and since no other statement affects COL it will be turned off.

But what state is my timer in when "U" is displayed. The real answer is that it can be ON or it can be OFF; the "U" says that the AC3 does not if it should turn it ON or OFF (so it does nothing). Wow, that means my heater could be on and I don't know it. The short answer is yes, but if the heater is ON then the tank temp will raise and you should hit the "If Temp" which will turn the heater OFF and remove the "U" until the next time you reset the AC3.

A good rule of thumb...

* Never use "If Timer > 00:00" to initialize a timer when you have ON and OFF statements for a timer, sooner or later the "U" will go away and the timer state will be known.

* Use "If Timer" when a timer can be initialized once, and changed by many conditions (it saves program lines). For example, turn a pump on by default and program feed cycles to turn it off.

Hope this makes sense...


Click on my name to visit my homepage and access a collection of AquaController and Apex software, tips, trick and other Q&A including a link to the 'unofficial Apex new users guide' with loads of helpful information and don't forget to put a pin in my location map.

Current Tank Info: 225G, BK 300 Deluxe, Deltec PF601, Precision Marine Kalkreactor, 2-LMIII+6 pumps, SpectraPure UHE, Apex, LunarSim, Tunze 6305s. Mixed reef, clam, fish, etc.
kenargo is offline   Reply With Quote