Apex programming for water mixing and softener control

I'm having a couple issues with Apex programming I'm hoping you can help sort out. I'm running my Apex on freshwater systems, however I am also running RO due to being on a well with terrible water. To get it stable I mix in some of the tap water back into the water produced by the RO unit. What I am hoping to program is the Apex to control this process. I've got an electric ball valve on the tap water line going to the water storage tanks. Then a PM2 module with a salinity probe set for the low range to give microsiemens. Because it updates so slowly I'm hoping to program it to turn on the water valve, let it run for 3 minutes, then turn off for 10 mins. If it is still low then turn back on again and repeat the cycle. Currently I've got this-

Fallback OFF
Set OFF
If ROTDS < 300 Then OFF
Defer 000:03 Then OFF
Min Time 000:10 Then ON

However as you might guess it doesn't work and I'm not really sure why as I'm pretty new to the programming part of all this.


My second issue, because I'm on a well I'm also using a softener. When the softener backwashes it doesn't have a valve to prevent the backwash water from being sent down the line. So at the moment another valve closes to the RO units preventing them from running. I'd like to automate this as currently it has to be done manually and isn't backwashed as often as it should. My first idea was to have it watch for a wattage increase, however I found it only jumps a few watts to open a valve, not really enough to go by reliably. Any thoughts on how to get this done successfully? I'm happy to buy some parts if necessary.
 
Back
Top