PDA

View Full Version : anti-TDS creep auto top-off


sivert55
09/09/2008, 02:05 PM
I'm trying to get my AC3 to control a solenoid based on the positions of two float switches in my ATO reservoir. One switch is at the 100g level and the other at the 50g level. Using breakout boxes, the ac3 will be able to see the disposition of each float switch. I need help with the programming part.
The top float switch will be TO1 and the bottom will be TO2. The solenoid switch will be plugged into a port on the DC8, as yet unnamed. Let's call it VA1.
So, how do i write logic that will turn on plug port VA1 if TO1 and TO2 are open, and keep it on until TO2 and then TO1 float switches close (due to the rising water) then turn it off, leaving it off until both TO1 and TO2 open again.
I went back 7 pages in the Neptuce forum and didn't see anything like this. Has anyone ever tried something like this?

clp
09/10/2008, 11:23 AM
You can do this, but you'll need to create 2 intermediate timers to go the functionality you desire. Just create a couple of timer names (CLS and OPN), and have them use bogus control addresses (like P01 & P02). Here is the code:

If Time > 00:00 Then CLS ON
If Switch1 OPEN Then CLS OFF
If Switch2 OPEN Then CLS OFF

If Time > 00:00 Then OPN ON
If Switch1 CLOSED Then OPN OFF
If Switch2 CLOSED Then OPN OFF

If Timer OPN = ON Then VA1 ON
If Timer CLS = OFF Then VA1 OFF

Los
09/28/2008, 08:32 AM
THANK YOU, THANK YOU, THANK YOU. I've been searching and searching for this before asking the question myself and I see this wheel doesn't need to be reinvented. Thanks, Sivert55 for asking the question and thanks CLP for providing the answer.

How did the above code work out for you, Sivert55?

Also, could you help me with the code to add in two more functions:

1) An alarm in case the bottom switch is open for more than 30 minutes (to notify me in case there's a problem with my RO unit or a leak in the RO/DI storage tank). I was going to put in a third float switch even lower, but this would be an easier way to do it.
2) Another float switch. above the top one, to serve as a backup in case the top one gets stuck open. If the third float switch ever trips, I'd like it to set off an alarm AND shut off VA1.

Thanks in advance!

sivert55
09/28/2008, 08:42 PM
I haven't tried it yet because i jsut got finished painting my fishroom and installing the shelving this weekend. Hopefully, i'll have time this week to get th eequipment and AC3 isntalled.
Someone else that works for microsoft posted an answer to me that I'll forward to you. he gave me a link to a piece of software he has on his homepage that emulates an AC3 unit and allows you to test the running code before applying the code changes to your live system.
Let me know how yours goes too. I think this is a super way to take advantage of the flexibility of this open AC3 system.
-Trevis

Los
09/29/2008, 09:35 AM
I tried running the above code through Kenargo's simulator and it didn't work. That said, I'm REALLY a novice at this.

If you (or anyone else) figures out how to crack this nut, please let me know.

I was thinking another way to do the same thing would be to only have one float switch control it, but then to only let it run every once in a while, to prevent TDS creep. I'd then probably add in another float switch higher up as a backup to the first, in case it failed. Wouldn't that accomplish the same thing, but in an easier way and without the additional bottom level float switch?

Los
10/01/2008, 07:24 PM
Doh! I should have read the Best Practices sticky at the top of the Neptune forum. Kenargo (who in my opinion, is THE expert on the AC) came up with the following code to fill up the RO tank and avoid TDS creep. So that you don't have to look it up, here it is. BTW, if you have ANY improvements to this code, please, please post it here.

Plagiarized from Kenargo:

Program which uses 2 float switches to fill RO/DI reserve:


If Time > 00:00 Then DM1 OFF // Init dummy timer to off
If Switch1 Closed Then DM1 ON // If lower switch closes then turn on dummy timer
Max Change 030 M Then DM1 ON // Allow the timer to stay on long enough to fill holding tank

If Time > 00:00 Then ROD OFF // RO/DI defaults to OFF
If Timer DM1 = ON Then ROD ON // If dummy timer is on (because low water level hit) then turn on RO/DI
If Switch2 Closed Then ROD OFF // If high water float hit then turn off RO/DI

In short the Max Change should be large enough to allow the holding tank to fill + a little. The Max Change gives you a backup in case Switch2 fails. If the holding tank fills before Max Change time then switch2 will float and turn off RO/DI

sivert55
10/02/2008, 03:41 AM
That's exactly what i needed. Thanks Los for hunting that down. And thankyou kenargo for writing that for us.
-Trevis