Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: timk on September 27, 2014, 11:25:20 AM

Title: Trying to control air cylinder
Post by: timk on September 27, 2014, 11:25:20 AM
Need some help with ladder to control an air cylinder with sensors.

I have a 10" air cylinder with 2 sensors one spaced 3" from each end
I have a counter that is triggered from another sensor When the counter reaches 2 I want the cylinder to come on until the first sensor is on and stop there. When the counter reaches 3 It needs to come on again until it reaches the second sensor. and at a count of 4 it needs to come on and stay on.

I have tried
CT1.ACC=2 --- [/X6] ---- [Y16]  "X6 is the first sensor on the cylinder Y16 is the air valve

CT1.ACC=3 --- [/X7] ---- [Y16]  "X7 is the Second sensor on the cylinder

CT1.ACC=2 --- [/X6] ---- [Y16 Delay Off 3 Seconds]  "Now I just want the air valve to come on and stay on for a few seconds.

But when I try to run it [Y16] never come on even though the CT1.ACC is 2 and [X6] is on. (Status on both is green) but the output is never on.



Title: Re: Trying to control air cylinder
Post by: b_carlton on September 27, 2014, 12:31:31 PM
You should only have the output once in the ladder. Otherwise the state of the last rung controls the output.

Here are two ways to modify your logic:

Combine each of your conditions as parallel segments then end in just one output.

Keep your separate conditions but end each with a unique 'C' bit. Then add a final rung with each of these 'C' bits in parallel driving one output. This is probably the more 'readable' form as you can concentrate on each condition separately.
Title: Re: Trying to control air cylinder
Post by: timk on September 27, 2014, 12:42:09 PM
Thanks, That makes sense

Now it looks like a need to find a 4 or 5 way air valve. The one they got me to use has 2 coils but Port A or B is always on.

Title: Re: Trying to control air cylinder
Post by: plcnut on September 29, 2014, 08:18:58 AM
Sounds like you need a 4-way Closed center valve.
But do be aware, that positioning with a standard pneumatic valve/cylinder at any position other than end of stroke is very finicky, and is generally un-reliable and non-repeatable especially with varying loads... it all depends on your application.
Title: Re: Trying to control air cylinder
Post by: timk on October 03, 2014, 11:19:45 AM
Thanks

I am not really looking for precision or repeat-ability it is only to help test an addition to a machine we are designing. The finished product will more than likely use a servo or something. I was hoping I could just restrict the exhaust on the down stroke, apply air for a few ms each time I needed the cylinder to move down. But it only worked once in a while.(almost never)

So I added a couple of proxes to mid points on the cylinder. But cant seem to get the ladder sequence correct. I assume the only way to do it would be to have a valve move the cylinder down until the first prox makes. Then if the first prox goes off turn on the up valve until first prox makes again.
 
Does anyone have a ladder example of controlling the position of an air cylinder they would be willing to share.