Reef Central Online Community

Reef Central Online Community (http://www.reefcentral.com/forums/index.php)
-   Neptune Systems (http://www.reefcentral.com/forums/forumdisplay.php?f=368)
-   -   Help me with a programming question (http://www.reefcentral.com/forums/showthread.php?t=2045244)

supacharged21 07/16/2011 10:02 PM

Help me with a programming question
 
I have my dosing pump setup to drip alk at night. I want to set a ph saftey net to make sure things dont get crazy. The way my biocube is, it drips the alk before the ph probe, so you see a temporary swing after dosing. (maybe 10 seconds)

Is there a way to setup the program to cut off pump if ph goes above a certain level and leave a hysteresis period for the alk swing for a minute or so?

Here is the way I am doing it right now.

Fallback OFF
Set OFF
If Time 22:00 to 22:01 Then ON
If Time 23:00 to 23:01 Then ON
If Time 01:00 to 01:01 Then ON
If Time 02:00 to 02:01 Then ON
If Time 03:00 to 03:01 Then ON
If Time 04:00 to 04:01 Then ON
If Time 05:00 to 05:01 Then ON
If Time 06:00 to 06:01 Then ON
If Time 07:00 to 07:01 Then ON
If Time 08:00 to 08:01 Then ON
Defer 001:39 Then ON

LOTUS50GOD 07/16/2011 10:37 PM

You could add a if PH > 8.5 then Off at the top.
Since your PH should not get above PH.
I would also consider moving the probe or the area that you put the kalk since kalk is normally north of 11.0

swearint 07/17/2011 07:47 AM

No, the pH statement needs to go after the last time statement. Apex executes top to bottom, so later code has priority. If you want to add a Defer for the pH increase, you will need to use a virtual outlet. If you add it to the existing outlet, it will interfere with the timing of the dosage.

Todd

LOTUS50GOD 07/17/2011 06:41 PM

you are right Todd... as usual... LOL..

desx2501 07/18/2011 07:42 AM

Quote:

Originally Posted by swearint (Post 19032903)
If you want to add a Defer for the pH increase, you will need to use a virtual outlet. If you add it to the existing outlet, it will interfere with the timing of the dosage.

Why can't he just add this statement at the end?

If pH > [x] Then OFF
Defer 000:10 Then OFF

This way, wouldn't the dosage timing be preserved EXCEPT when the pH is higher than [x] for 10secs or more?

I would also believe that the "Defer 001:39 Then ON" would make sure it's NEVER ON. With the timing there, it would never be "ON" for more than a minute, so that last statement would prevent turning ON.

What am I understanding wrong?

swearint 07/18/2011 08:48 AM

Quote:

Originally Posted by desx2501 (Post 19036688)
Why can't he just add this statement at the end?

If pH > [x] Then OFF
Defer 000:10 Then OFF

This way, wouldn't the dosage timing be preserved EXCEPT when the pH is higher than [x] for 10secs or more?

It would; however, Defer applies to the outlet as a whole, not specific statements. In this case it would also delay the Set OFF and effectively extend the Time command. So now that I think about it, all he would have to do is increase the Defer...ON by the same amount.

Quote:

I would also believe that the "Defer 001:39 Then ON" would make sure it's NEVER ON. With the timing there, it would never be "ON" for more than a minute, so that last statement would prevent turning ON.

What am I understanding wrong?
The Time command operates in whole minute increments. So the minimum duration of say 22:00 to 22:01 is actually two minutes. The Defer effectively deducts 1:39 minutes, leaving a 21 second duration.

Todd


All times are GMT -6. The time now is 05:58 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.