Question on controlling a 3 Way Ball Valve

I am looking to learn if there is anything I need to know to connect and control a 3 way ball value to an ODCI-12.

I have, in a previous life, wired and controlled a few of those.

Hooking up is pretty straight forward. You are looking at 3 or 4 wires on yours?
Mine were three wire. Common, open and close.

Control is just a matter of making sure you don’t turn on both outputs at the same time.

Thanks for the insight @Beno mine has three 3 wires. So then in PAC when I am setting up the module I just need to label what input/wire is for what position when ON would that be correct.

From memory, I did just that, chan1 was ‘open’, chan2 was ‘close’.
This way when it came time to code up, it was pretty clear what I was doing…

open = 1; //open the value.

Latter in your code, when you have done opening the valve (and I assume you have set open = 0 some where)

close = 1; //close the valve

If you really want to make it clear in the code what is required:

//sequence to open the valve
open = 1; //open the valve
close = 0; //don't close the value

//sequence to close the valve
open = 0; // don't open the valve
close = 1; // close the valve

Its sort of overkill turning off something that is already off, but it makes it clear that only one output should be on at a time.

1 Like

Doesn’t the brand new release of PAC Control include a new MOMO instruction? (Mask On Mask Off). That is a great instruction for a case like this where you don’t want to take a chance that both outputs could be on at the same time.

I have found it works well to have a single variable to control the valve in the program, and then set the outputs based on that variable. That reduces the chance for both commands being active.

For instance, in the program logic:

//open the valve
openCommand = 1; //open the valve

//close the valve
openCommand = 0; //close the valve

At one common “output control” section of the program:

//set the valve outputs
openOutput = openCommand;
closeOutput = not openCommand;

If the goal is to insure that both outputs are never on at the same time, then you are going to want to turn off the “on” output before turning on the “off” output. In the examples shown one of the outputs is turned on before the other is turned off. There is a non-zero amount of time between those two commands.

You could use MOMO commands, but it is probably easier to just modify Beno’s example slightly:

//sequence to open the valve
close = 0; //don't close the value
open = 1; //open the valve

//sequence to close the valve
open = 0; // don't open the valve
close = 1; // close the valve