Apex programming question

I have been wrestling with this for some time and would like some input from all of you: how do I set up a software latching relay with my Apex? I am terribly forgetful and would like my Apex to catch my error when that happens. I'm planning to use float switches to control when a solenoid valve tied to the input of my RO/DI unit opens but would like a way to tell the system to shut off after a maximum amount of time regardless of what the switches indicate (ie a stuck switch). Is there a way to do this?
 
You need to set-up a virtual outlet. This is what I have set-up for my ATO
[ATO_Fail] virtual
Set OFF
If Tank_L CLOSED Then ON
Defer 003:00 Then ON

Then in my ATO I have a statement:
If Outlet ATO_Fail = ON Then OFF

So after 3 minutes of the float switch closing and the state not changing, the VO shows ON and the ATO is disabled until reset
 
I thought about that but just couldn't wrap my head around how to code the Virtual outlet. Thanks for that gpdno! Does that account for a float switch that gets physically stuck and won't close though? I'd like to try and plan for eventuality too.
 
Last edited:
As far as I can tell the Apex programming doesn't have any mechanism where I can time out an outlet (virtual or otherwise) and lock it out until I manually reset it. If I'm wrong I'd really love to see how some of you are doing this.
 
I thought about that but just couldn't wrap my head around how to code the Virtual outlet. Thanks for that gpdno! Does that account for a float switch that gets physically stuck and won't close though? I'd like to try and plan for eventuality too.


Yes. Basically once the time expires the VO will stay in that state until the float switch returns to a normal state.
 
You need to set-up a virtual outlet. This is what I have set-up for my ATO
[ATO_Fail] virtual
Set OFF
If Tank_L CLOSED Then ON
Defer 003:00 Then ON

Then in my ATO I have a statement:
If Outlet ATO_Fail = ON Then OFF

So after 3 minutes of the float switch closing and the state not changing, the VO shows ON and the ATO is disabled until reset

If it help you to visualize gpdno's example.

Tank_L refers to the switch (SwitchX) which is your float switch

You will have an outlet for your ATO control with the following
SET OFF
Fallback = OFF
If Tank_L CLOSED Then ON
If Outlet ATO_Fail = ON Then OFF

You should also set an alarm / email when the ATO_Fail outlet is ON

So the way this works is whenever your ATO is "on" and the Tank_L becomes CLOSED.
This turns on the ATO and sets off the 1st condition in the ATO_Fail outlet BUT....
since there is a 3 minute defer on the outlet - the ATO_Fail outlet does not turn ON right away
if things are good with your ATO - the switch will OPEN within 3 minutes and the ATO_Fail 1st condition is no longer true.
If things are still on after 3 minutes then the DEFER logic kicks in and the ATO_Fail outlet goes on
 
And, there's this specific example in the Neptune Apex Comprehensive Reference Guide that's available for free on Neptune's site. See page 138 under the heading "Having and outlet stay "off" if it trips a condition that later clears".

It's well worth having this guide - there are lots of code examples in the DIY chapter, as well as the Appendix - Common Issues and Solutions.
 
Back
Top