Click Plc Logic for Valve control

misterhyde

Member
Join Date
Jun 2014
Location
Michigan
Posts
22
Hello,

Its my first time using a PLC and I'm trying to create a program for solenoid valves that will control hydrogen gas flow through a series of dryer tanks. What I basically need is a few timers to open and close the different valves at set time intervals. e.g. valve starts open, 2 hour timer closes the valve and resets, 2 hours later it opens again and timer resets etc.

I have light bulbs wired into my plc to simulate the solenoid valves while I test the Ladder Logic. I want the bulb at Y1 to turn on/off every T1 interval but I can't get the timer to reset and repeat.

So far I have:

Rung 1: NC X1 with timer and output T1
Parallel: NO C1

Rung 2:NC X1 with output C1

Rung 3: NO T1, NO Y1, NC C1, with output Y1

Rung 4: reset Y1

Rung 5: End


Thank you
 
Have you tried removing the input to see of the timer will reset?

Not sure what is before your timer in the logic but let it go from 'high to low' and see if it resets
 
Thank you [[geniusintraining]] for your help and thank you [[milldrone]] for your Click PLC Ladder Logic. It works perfectly :nodi: . I'll just add a few timers and adjust the flip-flop time intervals for the different valves.

I've never programmed more than a C++ calculator before so this was pretty much what I looked like before your help o_O so thank you again.

If you have a moment to explain the steps of the ladder logic and what they are doing, I would be interested to learn for future use.
 
Actually, I have one more question.

If I want to run 3 dryer tanks in stead of 2, is there any way to program a timer that would open a valve for 2 hours and close it for 4 hours and reset back to 2 hours?

Some valves will be open for 4 hours and closed for only 2 hours while others will be closed for 4 hours and only open for 2 hours.

e.g. have one tank dry hydrogen for 2 hours (H2 inlet/oulet valves open and exhaust closed) while the other 2 tanks air out (H2 inlet/outlet closed and exhaust open to atm), switching dryer tanks every 2 hours in a 6 hour cycle.

I will post a diagram of the H2 dryer shortly
 
e.g. have one tank dry hydrogen for 2 hours (H2 inlet/oulet valves open and exhaust closed) while the other 2 tanks air out (H2 inlet/outlet closed and exhaust open to atm), switching dryer tanks every 2 hours in a 6 hour cycle.
This is called a sequence of events. There are several ways of doing this job, but probably the best for you is simply using 3 separate timers, one for each part of the cycle that is different.

First, make a list of the exact, complete cycle, from Step 1 to Step Last.

Step 1: On Tank 1, Open H2 Inlet/Outlet Valves, and Close exhaust valve for 2 hours. For Tanks 2 and 3, Close Inlet/Outlet valve and Open Exhaust valves for 2 hours. Use Timer 1 set for 7200 seconds (2 hours). Use "middle-man" bits as surrogates for each Step for your valve Outputs, so that each output is only used one time in the program.

Step 2: Timer 1 triggers Timer 2. On Tank 2, Open H2 Inlet/Outlet Valves, and Close exhaust valve for 2 hours. For Tanks 1 and 3, Close Inlet/Outlet valve and Open Exhaust valves for 2 hours. Use Timer 2 set for 7200 seconds (2 hours).

Step 3: Timer 2 triggers Timer 3. On Tank 3, Open H2 Inlet/Outlet Valves, and Close exhaust valve for 2 hours. For Tanks 1 and 2, Close Inlet/Outlet valve and Open Exhaust valves for 2 hours. Use Timer 3 set for 7200 seconds (2 hours).

Step 4: Repeat until STOP button is pressed, or other signal is present.
 
Here is how the program would look, except I am not sure what you mean by "H2 Inlet/Outlet Valve". Is that one valve or two?

EDIT: I added the 3 additional valves, so that there are now 9 valves that Open or Close in a 6-hour sequence as you directed.
 
Last edited:
Thank you [[milldrone]] for explaining the ladder logic and thank you [[Lancie1]] for the new ladder logic sequence.

I'm hoping to blend the two ladder logic techniques you both built to do the following.I apologize for changing the logic again and I really appreciate your help and could not be doing this without you. My boss decided he wants me to save some of the pressure while switching between tanks so the process would look something like this:

For tank1, tank2, and tank3 I have input valves i1, i2, and i3; output valves o1, o2, and o3; and exhaust valves e1, e2, and e3.

Starting a 6 hour cycle from 0:00-6:00 I would have 12 repeating steps:

Step 1) Open i1 and o1 at 0:00 (Open for 2 hours and 1 min)
Step 2) Close i3 and o3 at 0:01
Step 3) Open e3 at 0:02 (Open for 3 hours and 57 min)
Step 4) Close e2 at 1:59
Step 5) Open i2 and o2 at 2:00 (Open for 2 hours and 1 min)
Step 6) Close i1 and o1 at 2:01
Step 7) Open e1 at 2:02 (Open for 3 hours and 57 min)
Step 8) Close e3 at 3:59
Step 9) Open i3 and o3 at 4:00 (Open for 2 hours and 1 min)
Step 10) Close i2 and o2 at 4:01
Step 11) Open e2 at 4:02 (Open for 3 hours and 57 min)
Step 12) Close e1 at 5:59
Repeat from Step 1) at 6:00

Thank you so much for all your help,

MisterHyde
 
Before we get too far along, please tell us how your valves are set up. Do they open when the solenoid is energized and close when de-energized (a common method)?

On the other hand you could have an Open and Close solenoid for each valve. It does make a difference in the program.
 

Similar Topics

Hi all, student newbie here. Was curious if there was anyway to stop logic from running during break times? Like all physical and software inputs...
Replies
12
Views
3,259
Complete noob here, using a Click C0-02DD1-D to run a test stand. Requirement is to turn on motor run for X seconds, turn off and dwell for X...
Replies
6
Views
1,111
merry christmas and happy new year i have a click c0-00dr-d and allen bradley 2711c-t3m. can the panelview talk to the click plc via modbus...
Replies
1
Views
244
Hi guys, i have never had to do a PWM Output or input before i have a Device that to dimm the lamp output from the ballast, the ballast has a 24V...
Replies
6
Views
1,091
I am trying to set a bit to command the Zebra ZT230 to print a label and receive a confirmation bit from the unit via an Automation Direct Click...
Replies
0
Views
682
Back
Top Bottom