Simple question, one output contolled by multiple inputs

Describe your system and processes, and post your config file.
Post Reply
sirjoshua
Posts: 3
Joined: Tue Nov 13, 2012 3:23 pm
Bot?: No

Simple question, one output contolled by multiple inputs

Post by sirjoshua »

I have a rather simple question. I am building a glycol system for my fermenters, a total of 6 of them. I would like to control the flow of glycol to the fermenters with a single pump, which is where my question lies.

Each fermenter will have a temp probe that is wired to the BCS-462. Each fermenter will also have an autovalve wired to the BCS that would open when cooling is needed. I would like to wire the pump to a single discrete output. When the temperature of a fermenter increases beyond the setpoint, the autovalve would open and the pump would be switched on. When it has cooled back to the setpoint, the pump will kick off and the autovalve will close. Seems fairly simple.

So here is my question: Can I do this with out problems? My concern is what would happen if multiple fermenters are triggering the pump to turn on when the pump is already running? Is the BCS capable of using a single output that is to be controlled by multiple inputs, simultaneously? If this won't work, any suggestions on workarounds?

Thanks in advance!
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Simple question, one output contolled by multiple inputs

Post by JonW »

You could do this with ladder logic to control the pump output when any of the six fermenter valve outputs are triggered.

Think of the ladder logic programming as a global control area. It can activate/deactivate outputs across processes (among other things).
sirjoshua
Posts: 3
Joined: Tue Nov 13, 2012 3:23 pm
Bot?: No

Re: Simple question, one output contolled by multiple inputs

Post by sirjoshua »

Is there any way to accomplish this without using ladder logic? I would have to say my biggest bcs weakness is in ladder logic, unfortunately in this case.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Simple question, one output contolled by multiple inputs

Post by JonW »

Sure, you could do it with a bunch of relays, but that's going to cost you hardware and complicate the wiring.

Doing it with ladder logic really isn't that bad. Tell me what outputs you're using and I'll mock something up for you.
JonW
Site Admin
Posts: 1726
Joined: Sun Jul 18, 2010 7:51 am
Bot?: No
Location: Huntington Beach, CA
Contact:

Re: Simple question, one output contolled by multiple inputs

Post by JonW »

Based on what you described of using 6 temp probe outputs and one additional output for a pump, below is a description of what should work. I'm assuming Out0 to Out5 for the temp probes and Out17 for the pump.

Using psuedo-code, your basic logic might look like this:
IF ( Out0 = ON   Or   Out1 = ON   Or   Out2 = ON   Or   Out3 = ON   Or   Out4 = ON   Or   Out5 = ON ) Then Out17 = ON

So basically, if ANY of the 6 specified outputs are on, then turn Out17 ON. Likewise, if NONE of the specified outputs are ON, then turn Out17 OFF.

Now, this is where it gets a little tricky with the BCS. Ladder logic only support 4 AND/OR conditions in a logic block, but you have 6 that you need to test for. To accomodate this, we'll need to break this up into two blocks that test 3 outputs each and then use some intermediate variables (Registers) to track those blocks.

So, the psuedo-code, it might look like this:
IF ( Out0 = ON   Or    Out1 = ON   Or   Out2 = ON ) Then Reg0 = ON
IF ( Out3 = ON   Or    Out4 = ON   Or  Out5 = ON ) Then Reg1 = ON
IF ( Reg0 = ON   Or    Reg1 = ON ) Then Out17 = ON

OK, hopefully that all made sense. Below is a picture of what the 3 line above would look like in BCS ladder logic code. (Note the dashed lines in the screen-shot between every 4 rungs of the ladder logic. This is where the AND/OR logic cannot span more than 4 lines at a time.

Also note that because ladder logic is not part of any process/state, that it is active all the time. Thus, if you manually turn on one of the 6 outputs, you would see Out17 also turn on.

Image
Last edited by JonW on Fri Nov 16, 2012 8:36 am, edited 1 time in total.
Reason: typo
sirjoshua
Posts: 3
Joined: Tue Nov 13, 2012 3:23 pm
Bot?: No

Re: Simple question, one output contolled by multiple inputs

Post by sirjoshua »

That actually made a lot of sense, and actually drastically increased my understanding of ladder logic. It really is just like working with relays, but with an interface. I really appreciate you taking the time to mock that up for me! I understand it well enough now that I think I can make something like that work.

Thanks again, I really appreciate it.
Post Reply