programmable logic question

jdjeff58

New member
I'm trying to see if I understand how to set up PL.

I want to use my dosing pump as a water exchanger. One pump will drain water out and one pump will bring fresh water to the system. I have an auto topoff that comes directly from my DI unit through a solenoid valve which is triggered via a pressure switch in the sump. Solenoid valve is closed until a low level condition. I'm thinking of plugging the solenoid valve into a powerbar socket to disable it's operation when either dosing pump is active. No power to the solenoid valve = closed.

What I want to do is tell the solenoid valve to close/stay closed when Dosing pump 1 OR 2 is active. The solenoid valve will be plugged into socket 4 for example. Are the settings below correct? Or do I have this all wrong?



ATO_Dosing.jpg


ATO_Dosing2.jpg
 
Last edited:
This only a part of the complete function you want to achieve.

You need something like this:

socket 4 = water 1 AND NOT (dosing pump 1 OR dosing pump 2)

To achieve this we need 2 logic cells (gates). The 2 logic functions are cascaded then.

The first logic gate with OR has been programmed so far correctly.
Now you need another logic function:

logic 2 = water 1 AND NOT logic 1
-> input 1 = water 1, input 2 = logic 1 inverted (for inversion of states check the box "Invert")

The last thing to do: Set socket 4 to logic function 2
 
Ok...I was thinking that it was probably necessary to define each and every function and link them together (cascade). I wasn't sure how to do that. I didn't even think of using logic in my Boolean expression for number 2....no pun intended.

So, if I have a heater AND a circulation pump in my saltwater reservoir AND I want them to turn off on a low level in the reservoir AND disable dosing pump 1 AND 2, I would say? (assuming logic 1 and 2 are already being used for dosing/ATO):

Logic 3 = heater2 (always on?) AND pump 2
Logic 4 = Dosing 1 AND Logic3
Logic 5 = Dosing 2 AND Logic 4
Logic 6 = water 2 AND NOT Logic 5

Water 2 = Logic 6

I'm not sure if the above is correct, but if you are using more than one 'Always on' socket, will they all be affected? My reservoir heater is on a seperate temp controller and I'm not sure what to call the socket. Thanks.
 
Last edited:
Either i am missing something or have a big concern here

you said

"I want to use my dosing pump as a water exchanger. One pump will drain water out and one pump will bring fresh water to the system. I have an auto topoff that comes directly from my DI unit through a solenoid valve which is triggered via a pressure switch in the sump."

Marine set up? correct?

Well if you do this what is going to happen to your salinity level?

Salt water out, fresh water in?
 
<a href=showthread.php?s=&postid=11927329#post11927329 target=_blank>Originally posted</a> by AQD_ottawa
Either i am missing something or have a big concern here


Salt water out, fresh saltwater in. Disable ATO during that process.
 
jdjeff, seems to be OK. I think now is the moment to try it...

regarding your question "always on":

It doesn't make any sense to have a logical expression where one operand is a constant value. Because:
1 AND x = x
0 AND x = 0
1 OR x = 1
0 OR x = x
these are the rules for boolean logic
 
Ok good...just wanted to make sure I understood the flow. I see what you are saying about constant value. I need to ID a socket that controls a independent temp controller since I don't have a second GHL temp probe. I'm not sure how to ID the socket for on/ off. I use other 'always on' sockets...i.e my Vortech pumps, they have their own controller. I guess I was wondering if programmable logic would turn on/off an 'always on' socket. And if it does, will it effect all other 'always on' sockets as well.

So really, the only issue I need to solve now is what to label the socket for my independent temp controller.

My present setup (Note - I will have 2 open sockets in the very near future as I have ordered Profilux lite stick. So the Blue (Timer2) and White LED(Timer3) in the screenshot will be open):

Dosing.jpg
 
Last edited:
I am not sure if i understand your question.

What is your "independent temp controller" supposed to do? Has it any relation to the pumps? Or should it be "always on"?
 
It controls a heater and that heater will be in my fresh saltwater reservoir (container). No relation to the pumps. I just want to maintain 80°F and will use a small power head to circulate the fresh salt water. When I reach a low level in the fresh water reservoir, I want to disable the heater and circulation pump to keep from damaging them. I also will need to stop both dosing pumps as my new saltwater will be depleted (low level). It's a fail safe.

But the 'independent temp controller' is just a seperate unit that I've had here and I've been using it to control temp for my new saltwater mix for manual water changes. It's more accurate than the thermostat on the heater itself. The heater plugs into the controller. No power to the controller will turn off the heater. So if I plug it into a power bar, the socket should be 'always on' unless there is a reason otherwise.

I was trying to determine: If I call the socket 'always on', and create a boolean expression in 'programmable logic' to look at the 'always on' socket, will it affect ALL other 'always on' sockets? It's difficult to explain in writing.
 
which level sensor? an extra one? maybe level 3?
The assign the function "water 3 [inverse]" to the socket of the temp-controller.
You can't influence a socket with the function "always on" - like the name says.
 
Ok...that makes sense. I'm going to start renaming sockets for what they actually are instead of 'always on' (i.e. skimmer and return pump) I haven't had a real need up to this point to do much controlling. I've been turning things on and off in the software manually as I need to. But now with the dosing pumps (contiuous water exchange) and LED sticks, things are going to get a little more exciting. Just wanted to be clear on how to approach prog logic.

It will actually be level 1 or 2....since my auto topoff solenoid will be plugged into the controller now. I will use the profilux level float for the reservoir. I haven't used any level inputs to the profilux up to this point.
 
PL question

PL question

How would I use the programmable logic to do the following:

If Con1 is less than 1.025, then I want Doser 3 to turn on to top off the tank and add more saltwater; therefore, I want Level 1 off. This will increase my kg/l to 1.025.
If Con1 is 1.025 or above, then Level 1 is used to top off tank.

so...

IF con1 is > 1.025 AND Level 1- THEN Doser 3 ON AND Water 1 OFF
IF Con1 is < 1.025 Level 1- THEN Water 1 ON

Right now I set the following:
G1 to AND Cond 1 Increase/Doser 3 -- set PL to Doser 3
G2 to AND Cond 1 Decrease/Water1 -- set PL to Water 1

but it doesn't take into consideration that if Cond 1 >1.025 then Doser 3 is off and Water 1 takes over -- does it?

Logic was ont my strong suit, LOL.
 
Back
Top