Apex users I have some programming questions

That’s correct. That would run the pump for 15 seconds instead of 10 seconds.




Yes, it will run the freshwater pump for one minute (because of the defer) or until the sumphi float switch is closed, but looking over this thread it seems like that’s not correct... you want it to stop once ATO_NL is open. If that’s the case you should modify the code as follows:

Fallback OFF
Set OFF
If ATO_NL CLOSED Then ON
If Time 11:46 to 11:56 Then OFF
If Time 11:57 to 11:59 Then ON
If ATO_NL OPEN Then OFF
If SumpHi CLOSED Then OFF
If Time 12:00 to 12:01 Then OFF
Defer 002:00 Then ON
Min Time 010:00 Then OFF

So educate me.

So the way the code is now, even if the ATO_NL is closed the freshwater pump will still pump water into the sump for one minute?

It looks like you are changing the code to basically ignore the background set off, correct? How does that make it operate any different?

Edit:
WAIT! I think your learning me here.

It’s because you put the “If Ato_NL open then off” further down the code right!
 
Last edited:
So educate me.



So the way the code is now, even if the ATO_NL is closed the freshwater pump will still pump water into the sump for one minute?



The if time command will tell it to turn on from 11:57:00 to 11:59:59, unless it's overridden by a command below. However, the defer command tells it that it must remain in an "˜on' condition for two minutes until it will actually turn the outlet on. So in that case, from 11:57:00 to 11:59:00 it will still be off because of the defer command. It will turn on at 11:59:01 and the pump will run until 11:59:59. However, it can be overridden by a lower command. So if sumphi becomes closed during the one minute that it's running then it will stop running.

With the modification I added then if ATO_NL becomes open during that minute that it's running then that will stop the pump as well.
 
The if time command will tell it to turn on from 11:57:00 to 11:59:59, unless it's overridden by a command below. However, the defer command tells it that it must remain in an "˜on' condition for two minutes until it will actually turn the outlet on. So in that case, from 11:57:00 to 11:59:00 it will still be off because of the defer command. It will turn on at 11:59:01 and the pump will run until 11:59:59. However, it can be overridden by a lower command. So if sumphi becomes closed during the one minute that it's running then it will stop running.

With the modification I added then if ATO_NL becomes open during that minute that it's running then that will stop the pump as well.


And that's because that line is now below the ato "œon" time command right?
 
Alright for some reason this didn’t work.

When the switch turned off in the NSW container the pump stopped and didn’t fill the sump.

Any ideas as to why?
 
Alright for some reason this didn't work.

When the switch turned off in the NSW container the pump stopped and didn't fill the sump.

Any ideas as to why?



So just to be clear, the NSW reservoir emptied and the low level switch turned on and the pump stopped immediately?

Post a copy of the program for the fill pump as I know we've gone through a few iterations, so it would be good to see exactly what you have in there now.
 
Is there a good resource to learn Apex code and syntax?



The apex comprehensive reference manual is a good place to start. Particularly chapters 4, 5, and 6. It's available here...

https://www.neptunesystems.com/downloads/docs/Comprehensive_Reference_Manual.pdf

It was written for the classic apex, but the language is the same, so all of the programming details apply to the new apex.

It's really a pretty simple (and unfortunately somewhat restrictive) language, so if your familiar with scripting and programming you should pick it up pretty quickly. There are ways to work around a lot of the limitations as well, so it's not as restrictive as it first seems.
 
So just to be clear, the NSW reservoir emptied and the low level switch turned on and the pump stopped immediately?

Post a copy of the program for the fill pump as I know we've gone through a few iterations, so it would be good to see exactly what you have in there now.

Yep the NSW container emptied, the low level switch closed, the sump fill pump stopped.

Fill pump program

Fallback OFF
Set OFF
If Time 12:01 to 12:02 Then ON
If ATO_NL OPEN Then OFF
If SumpHi CLOSED Then OFF
If NSW_Lo CLOSED Then OFF
If Output NSW_E_Delay = ON Then OFF

NSW e delay program
Fallback OFF
Set OFF
If NSW_Lo CLOSED Then ON
Defer 001:00 Then ON
 
Remove If NSW_Lo CLOSED Then OFF from the fill pump program. That shuts it off immediately when that float switch closes. The NSW_E_Delay outlet will turn off that pump one minute after the float switch closes, so that allows it the opportunity to finish filing on the run it's currently doing, but then won't let it run again until the switch is open again.
 
Remove If NSW_Lo CLOSED Then OFF from the fill pump program. That shuts it off immediately when that float switch closes. The NSW_E_Delay outlet will turn off that pump one minute after the float switch closes, so that allows it the opportunity to finish filing on the run it's currently doing, but then won't let it run again until the switch is open again.

Ahhhhhhhh ok that's kind of what I was thinking but I wasn't sure.

Apex updated successfully!

Your the best dude.
 
She works!

The only small issue I have now is the float can sometimes open and close when the water level drops as it bounces around in there from the circulation pump.

I’m assuming I need to add a long min time statement in the Delay outlet code.

Something like this?

Fallback OFF
Set OFF
If NSW_Lo CLOSED Then ON
Defer 001:00 Then ON
Min time 08:00:00 then off

That would keep the Delay outlet on for a minimum time of 8 hours right?
 
Apex users I have some programming questions

She works!

The only small issue I have now is the float can sometimes open and close when the water level drops as it bounces around in there from the circulation pump.

I'm assuming I need to add a long min time statement in the Delay outlet code.

Something like this?

Fallback OFF
Set OFF
If NSW_Lo CLOSED Then ON
Defer 001:00 Then ON
Min time 08:00:00 then off

That would keep the Delay outlet on for a minimum time of 8 hours right?


What you have there isn't valid syntax. The min time command is only specified in minutes and seconds, so if you wanted 8 hours you would need to do 480:00 (480 minutes, which is 8 hours).

However, beyond that, what you have would keep the outlet off for a minimum of 8 hours. If you wanted to keep it on for 8 hours then you would want to do:

Min time 480:00 Then ON

That said, I'm not sure why this is an issue. The defer command that was already there means that the outlet will only turn on when the NSW_Lo switch has been closed for one full minute. So if it's bouncing around then even with the way this outlet is currently programmed it shouldn't be changing state rapidly.
 
Last edited:
What you have there isn't valid syntax. The min time command is only specified in minutes and seconds, so if you wanted 8 hours you would need to do 480:00 (480 minutes, which is 8 hours).

However, beyond that, what you have would keep the outlet off for a minimum of 8 hours. If you wanted to keep it on for 8 hours then you would want to do:

Min time 480:00 Then ON

That said, I'm not sure why this is an issue. The defer command that was already there means that the outlet will only turn on when the NSW_Lo switch has been closed for one full minute. So if it's bouncing around then even with the way this outlet is currently programmed it shouldn't be changing state rapidly.

Hey, sorry I didn't see this response.

I guess I mis-stated the issue. The problem isn't with the outlet switching states as much as it is getting overly notified.

If i set the email alarm to notify when the float is closed, the float flapping around will just send me alert after alert.

If I set the emaill alarm to notify me based on the outlet state, then I'm getting notified every minute or so.

I just want to get notified once, or at least once every few hours that it's low. So that's what I was trying to accomplish.
 
If you set the notification on the float switch then it will definitely keep notifying you as it turns on and off, but if you set it on the outlet then I wouldn't expect frequent notifications. From what I can see the apex will send a notification as soon as something changes state, but if the alarm condition remains on then it should only notify you every few hours.

When you get frequent notifications for the outlet what do they say? Is it showing the outlet going on and off or are you just getting on notifications?
 
If you set the notification on the float switch then it will definitely keep notifying you as it turns on and off, but if you set it on the outlet then I wouldn't expect frequent notifications. From what I can see the apex will send a notification as soon as something changes state, but if the alarm condition remains on then it should only notify you every few hours.

When you get frequent notifications for the outlet what do they say? Is it showing the outlet going on and off or are you just getting on notifications?

Hey buddy.

On and off notifications about every minute or two.
 
Hey buddy.



On and off notifications about every minute or two.



That surprises me a bit as the program requires the float to be triggered for a full minute before it turns the outlet on. Once the float has been triggered for a minute it seems unlikely that it would switch off again. Is it possible that you still have both the outlet and the float switch in the program for the alarm?

You could add the line

Defer 005:00 Then OFF

To the bottom of the delay outlet. (Don't change the existing defer line... just add this one under it). Once the outlet is on that will require the float switch to be in the off position for 5 full minutes before the outlet goes off. Hopefully that will keep it on once it goes on even if the float switch isn't stable.
 
Personnel I need to program the DOS to dose 35ml of a medicine every 48 hours but I don't know how to do this program, if anyone can help me I appreciate it. (I don't normally do this, but I have a trip scheduled and I would not like to interrupt the treatment).
 
Personnel I need to program the DOS to dose 35ml of a medicine every 48 hours but I don't know how to do this program, if anyone can help me I appreciate it. (I don't normally do this, but I have a trip scheduled and I would not like to interrupt the treatment).


Did you try using the fusion task list? It will have a wizard and walk you through the whole thing. If it doesn't show up you will have to do what I am about to do which is mail the entire dos back for repair. Gotta love tech


Sent from my iPhone using Tapatalk
 
Back
Top