New to XOD need advice on controlling a solenoid till 4 switches are true

Working on a project and looking for some help.

I am familiar with some of the basics of XOD programing(okay just enough to get in trouble). I have a programs that:

When I press a start switch it activates two solenoids.

One is on a delay which I used a delay to make it work but the other needs to stay active till 4 switches show true. The will all show true at different times but once they are all true I want the solenoid to stop.

Any advice? Basically its a lift head for a water filler on 4 different vessels. When all 4 are full I need it to lift the head.

Could you use “and” for boolean or “wait-all” for pulses

Hi there you could try something like this.

I am able to get this to work. However the float valves work in a normally closed situation until the level of liquid reaches them. It then opens the circuit.

I am using a button node and it doesn’t see to work unless I inverse the switches to start normally open and close when they float. The issue is that the distance the floats need to move is too great when working in that situation.

use node not after the button

Yup. That what I did. Not the issue is that the 4 sensors may read full…but they change their value waiting(foaming of liquid) for all them to read full and then that puts the program in a situation where only one or two sensors are reading full. I know its something simple like adding a flip flop. Basically I need them to once reading full once the value cannot change until the program is run again.

Back to it I go. I am so close its crazy. I have been working this project for months and now we are just about there!

set with 4 flip-flops, when completed reset all

I am thinking I add the flip flops after the not… and before the and?

well I got confused enough to make it fast from the cell phone, but I don’t know if the solenoids should be all 4 at the same time, if so, you only need a digital-write node

If you want to turn pump on, then turn it off after all 4 sensors have triggered (even if they are no longer triggered), then wait-all-once is probably what you want instead of the and node in previous examples. Pulse wait-all-once-RST when you turn on the pump. If sensor1 triggers, wait-all-once will remember that it has triggered since RST (even if it turns off before all the sensors trigger). Once all sensors have triggered, it will send an output pulse that can be used to turn off the pump.

If you want to pump until all sensors indicate full, then code shown above by others is probably what you want.

Perfect. I have it running exactly how I want it and was able to eliminate a bunch of code by using the wait-all-once node.

Thank you!!!