Programming tasks for multiple tanks from 1 card?

We are trying to set up controls to operate two tanks from the same card, alternating between the two programs. The goal is to fill tank 1, then alternating to fill tank 2 when tank 1 is full, and repeating. However, the automation cards only have an input for one tank at a time. Since these tanks are filled from the same inlet pipe, we’d like to alternate between them. Once the tanks are full, we want to run a specific program for each tank that directs where the flows go - we can use the irrigation and drain settings for each tank to do this.

I have a few fixes that I think will work, but I want to run them by you first.
We can have the inlet valves (fill valves for each tank) alternating, so one is always open while the other is always closed. I think this can be done with a connection to the relay that operates this way. However, I then need to program into the automation cards the following steps to follow when the tank is full. I am not sure that if I have two automation cards, one for each tank, that if I set the valve to fill as the first step of the program if it will wait for the other valve to close before opening this fill valve. I know on other controllers they operate this way, with the tasks queueing until its allowed to open the fill valve, but usually this is with programs on the same automation card rather than on two different cards.
Another fix is if there are any cards that I can program what tank to fill, irrigate, and drain. It looks like I can only set up one tank for each automation, rather than multiple tanks.

Any help would be appreciated. Thank you in advance.

Hi Gregory,

The Fertigation control card may be your solution. It was designed to manage fertigation for multiple tanks, switching valves for common sources (city water) and common destinations (drain) for multiple tanks.

Give this a try: Add a Fertigation control card, set up the multiple tanks, and configure the fill/drain valves and pumps.

Once that’s configured you should be able to run individual tasks - fill a tank, drain a tank, etc. You can customize parameters so the tasks look like “Fill tank 1 to 75%” and “Fill tank 2 to 75%”.

Once you’re confident you can manually kick off these tasks (valves and pumps switching as necessary), add a fertigation automation card to do it for you. Something like - between 7am and 4pm run the “Fill tank 1 to 75%”, followed by “Fill tank 2 to 75%”, followed by “Pause for a period - 5 minutes”. Set to repeat and Bob’s Uruncle.

The pause is there so the system doesn’t loop through hundreds of these a minute when both tanks are already filled.

Hi Loren,

I don’t think the fertigation control card will work, as it only has settings to add the valve to the tank and the valve from the tank, but no irrigation valve. We require a fill, drain, and irrigation valve to run our program.
Fill is from the sludge tank, drain is back to the cistern, and irrigation is into the reactor.
The ideal setup is to fill, pause, irrigate, pause, drain, restart for Tank 1.
When tank 1 is filled (step 1), open tank 2 to fill, pause, irrigate, pause, drain, restart.
I’d like the program to start on the opposite tank as soon as the fill step is achieved (ie. the fill valve closes), leaving time for the pause/irrigate/pause/drain while the other tank is filling.
Is this possible given the current card setup? or do we have to program some connections in the background, say having 1 fill valve always open?

It sounds like the fill,pause,irrigate,pause,drain,pause(repeat) can be set up independently for each tank using the Tank control and the Irrigation automation cards.

The challenge is in synchronizing these two automation cards so the cycle for one tank begins upon completion of the fill task of the other tank (both ways?).

The simplest solution would be to offset the tasks in time. If there are only a handful of cycles throughout the day (say 10 or less), you could set them up to start at specific time offsets, with no repeating. This would require no special programming.

If, however, you require the completion of one task to start another task (or sequence of tasks), the only mechanism (without custom programming) is to use the connected cards functionality.

This is where named tasks come in handy. Let’s say you named your first pause task (on Tank 1 card) “Pause after Filling”, and that consists of a Pause for a Period of 20 minutes.

Then on Tank 1, you could set up a connected card that says "When my current task equals Pause after Filling, send the Start Task message to the Tank 2 card of “Fill Tank”.

Since tasks queue, you could continue with another connection triggered by “Pause after Filling” to tell Tank 2 to do the next step (pause after filling), and the next (irrigate), and the next(drain).

The result is as soon as Tank 1 “Pause After Filling” task begins, all of the tasks for Tank 2 are queued up.

That’s an example of using the Connected Cards for custom automation. If none of these built-in mechanisms work, there’s always the ability to use JavaScript with the built-in Node-RED service, or your favorite programming language using the external API.