PDA

View Full Version : Jr. Programming help for autofill sequence


original kuhli
01/06/2008, 11:51 PM
I'm trying to setup an autofill sequence for a setup that will have:
-undertank plumbing (no sump)
-drain solenoid
-fill solenoid

My objective is to have a fill(FIL) sequence only run within a time window, this window will follow a timed drain(DRN) and not allow the tank to fill while draining (just a waste of water). The goal is to not have the tank capable of filling outside of the 20 or 30 minute interval following the completion of a drain.

I'm attempting this with the logic below, but the float switch that controls the fill doesn't respect the timer I've applied to the FIL cycle, it is capable of running any time of day including during DRN.

I've tried it both ways:
If Time > 20:30 Then DRN ON
If Time > 20:33 Then DRN OFF
If Time > 20:30 Then FIL OFF
If Time > 20:33 Then FIL ON
If Switch OPEN Then FIL OFF
If Switch CLOSED Then FIL ON

and

If Time > 20:55 Then DRN ON
If Time > 20:58 Then DRN OFF
If Switch OPEN Then FIL OFF
If Switch CLOSED Then FIL ON
If Time > 20:58 Then FIL ON
If Time > 20:55 Then FIL OFF

Is it possible to have a timer or other function override a 'switch' or do switches always override timers/other logic functions?

clp
01/07/2008, 01:30 PM
Do this instead:

If Time > 20:55 Then DRN ON
If Time > 20:58 Then DRN OFF
If Switch OPEN Then FIL OFF
If Switch CLOSED Then FIL ON
If Timer DRN = OFF Then FIL OFF

Curt

original kuhli
01/07/2008, 05:50 PM
Instead of:

If Timer DRN = OFF Then FIL OFF

you must mean

If Timer DRN = ON Then FIL OFF

I can't test it while at work but will give it a shot when I get home...

clp
01/07/2008, 05:54 PM
Right.

Curt

original kuhli
01/07/2008, 11:45 PM
This one seems to work, I'd tried it one last time before I posted last night. I'm not quite understanding the programming language 100%, is either routine superior?

Can you shed some light on the logic?

If Time > 21:22 Then DRN ON
If Time > 21:25 Then DRN OFF
If Switch CLOSED Then FIL ON
If Switch OPEN Then FIL OFF
If Time > 21:22 Then FIL OFF
Max Change 020 M Then FIL OFF

clp
01/08/2008, 01:55 PM
The program you have is not going to do what you want in general. FIL is going to turn on/off whenever it wants based upon the switch status - no time involved at all. The max change just makes it stay off for at least 20 minutes before it is allow to turn back on. If it did what you like it was just coincidental.

Curt

original kuhli
01/08/2008, 02:23 PM
Thanks Curt, your program works well. The only thing I'd like to do is set the tank to only be allowed to fill while I'm around for the first while.

Where within the section of program you sent should I place a section like this:

If Time >21:25 THEN FIL OFF
If Time <21:50 THEN FIL ON

The goal is to create a global time where filling can not occur.