Virtual Outlet code question

MAXreefer

New member
This is for the APEX.

I am using the great coding from the "unofficial guide" to have my skimmer come back on with a delay of 5 minutes after the virtual outlet "MAINT" for maintenance/water changes is used.

outlet code for the skimmer:
If Outlet Maint = ON Then OFF
If Outlet Maint = OFF Then ON
Defer 005:00 Then ON

I want to setup another virtual outlet called "DOSING" for dosing several additives.
I want to add a similar code to the outlet settings for the skimmer or will it override something? I want the skimmer to be turned off for 30 minutes.

If Outlet DOSING = ON Then OFF
If Outlet DOSING = OFF Then ON
Defer 030:00 Then ON

I assume the DEFER code is pretty stupid as I would have to activate the "DOSING" outlet and turn it back OFF immediately to have the 30 minute delay to happen. What coding would be better instead?

Thanks
Michael
 
It doesn't make sense to have two Defer commands for the same state. I have never tried it, but I assume the Apex would use the longest duration. Defer applies to the outlet as a whole, not specific commands. Anyway, you have the right idea. Try the following:

[Skimmer]
Set ON
If Outlet Maint = ON Then OFF
If Outlet DOSING = ON Then OFF
Defer xx:xx Then ON

The default state is ON, then if either virtual outlet is ON, the skimmer is turned OFF. The Defer then delays before allowing the skimmer to turn back ON. Choose an appropriate duration for the Defer.

Todd
 
Hey Todd,
thanks for the quick reply.

I see the logic behind your code but it won't work for my scenario.
In case of the "MAINT" my sump stabilizes within 5 minutes or so but when I have to use "DOSING" the skimmer should stay off for almost an hour or so.
By using only 1 defer I would have to set it for the longest time which I don't want.

Could a statement like this work?
I know you can use "If FeedD 005 Then OFF "
Would the APEX understand "If DOSING 020 Then OFF"
 
No, that syntax is specific to the Feed command. In order to do that, you would have to use one of the Feed cycles rather than one of the virtual outlets. If you post the code for the outlets (real and virtual) I can take a look at it to see if there are any alternatives.

Todd
 
hm....

What would be if use one DEFER command in the real outlet for the MAINT and put the other DEFER command in the virtual outlet for DOSING itself?
 
That was actually my first thought, but the problem is that will just extend the duration of Maint or Dosing.

Todd
 
But wouldn't be a big problem...

I don't mind if the REAL outlet is just a DEFER of 5 minutes.
Adding this to the VIRTUAL outlet time of 60 minutes is not a biggie....

Going to try this out now

Thanks for all your help Todd
 
Here is what I did and yes I am really a novice in programming all this and still confused about all those ON and OFF conditionals. Maybe I did it the wrong way but for some reason it works.

[skimmer]

Fallback ON
Set ON
If FeedD 002 Then OFF
If FeedB 000 Then OFF
If Outlet Maint = ON Then OFF
If Outlet Maint = OFF Then ON
Defer 005:00 Then ON
If Outlet Dosing = ON Then OFF
If Outlet Dosing = OFF Then ON

[Dosing]
Fallback OFF
Set OFF
Defer 010:00 Then OFF

I turned the virtual outlet ON and then immediately back to "AUTO"
The skimmer stayed off as expected for 15 minutes. 10 minutes from the virtual outlet + 5 additional minutes from the Defer command in the skimmer outlet.
 
Unless you really need it in that sequence for some reason, I'd recommend moving the

If FeedD 002 Then OFF
If FeedB 000 Then OFF

to the bottom of the [skimmer] outlet programming.

Typically, one would want the feed cycles to override all other programming.
 
BTW, Fallback has no effect on virtual outlets, so you can remove that statement from the [dosing] outlet.
 
Thanks Russ for the input.

I used those Feed cycles before I figured out the programming for Maintenance and dosing. Forgot to delete them. No need for them anymore as I control everything now from the Touch Screen.

Will remove also the FallBack from the virtual...

Thanks
Michael
 
Here is what I did and yes I am really a novice in programming all this and still confused about all those ON and OFF conditionals. Maybe I did it the wrong way but for some reason it works.

[skimmer]

Fallback ON
Set ON
If FeedD 002 Then OFF
If FeedB 000 Then OFF
If Outlet Maint = ON Then OFF
If Outlet Maint = OFF Then ON
Defer 005:00 Then ON
If Outlet Dosing = ON Then OFF
If Outlet Dosing = OFF Then ON

[Dosing]
Fallback OFF
Set OFF
Defer 010:00 Then OFF

I turned the virtual outlet ON and then immediately back to "AUTO"
The skimmer stayed off as expected for 15 minutes. 10 minutes from the virtual outlet + 5 additional minutes from the Defer command in the skimmer outlet.
OK, that is why I had asked for the code earlier. I was under the assumption that Dosing was performing additional tasks other than just turning the skimmer OFF. I guess you are manually dosing trace elements?

Here is your code cleaned up a bit, removing redundant statements:

[skimmer]

Fallback ON
Set ON
If Outlet Maint = ON Then OFF
If Outlet Dosing = ON Then OFF
Defer 005:00 Then ON

If you want, you could use a door bell button (momentary switch) to initiate Dosing outlet rather than using Manual ON > Auto sequence.

Todd
 
OK, that is why I had asked for the code earlier. I was under the assumption that Dosing was performing additional tasks other than just turning the skimmer OFF. I guess you are manually dosing trace elements?

Here is your code cleaned up a bit, removing redundant statements:

[skimmer]

Fallback ON
Set ON
If Outlet Maint = ON Then OFF
If Outlet Dosing = ON Then OFF
Defer 005:00 Then ON

If you want, you could use a door bell button (momentary switch) to initiate Dosing outlet rather than using Manual ON > Auto sequence.

Todd

If we wouldn't have you and Russ around we would be so lost. You guys are really great helping us so much... :thumbsup:

I guess using a little switch connected to the I/O box to initiate the outlet?
 
I guess using a little switch connected to the I/O box to initiate the outlet?
Yep!

I DIY'd a pair in a small project box for my old AC3. One button triggered a feed cycle, the other a longer maintenance window. It was attached to the rear of the canopy with velco, out of reach of mischievous little grand-kid fingers.

ac3pushbuttons.JPG
 
Yep!

I DIY'd a pair in a small project box for my old AC3. One button triggered a feed cycle, the other a longer maintenance window. It was attached to the rear of the canopy with velco, out of reach of mischievous little grand-kid fingers.

Very cool. Something to think about for sure

Thanks
 
Back
Top