trying to control pneumatics with CL - beginner

More
12 Jun 2015 02:28 #59718 by tome
I have some pneumatics I want to control with CL. Since I am new to CL, and don't really know what I am doing, let's start with a basic thing first before moving on to more compilcated timer stuff...

I have two solenoids one to engage/extend the tailstock, one to retract it. Ultimately I want to push a button from a GladeVCP panel to activate them and/or issue a custom M code for them.

When one issues an "engage tailstock" command I want to make sure that the retract solenoid is closed, and THEN open the extend solenoid. Likewise, when one issues a "retract tailstock" command I want to make sure the extend solenoid is closed and THEN open the retract solenoid.

I have CL running when I start Axis but trying to a) figure out how to "draw" the ladder for this, and b) figure out what to connect to what. I am having problems conceptualizing in my mind what the ladder diagram looks like.

In custom.hal I might have:
net tailstock-retract hm2_5i25.0.7i84.0.0.output-09 classicladder.0.out-00
net tailstock-extend hm2_5i25.0.7i84.0.0.output-10 classicladder.0.out-01
net tailstock-rev classicladder.0.in-00
net tailstock-fwd classicladder.0.in-01


I want to do something like below, but that can't be right because issuing the retract doesn't mean you also issue an extend. I don't have an input per se, just signal to extend/retract. I am confused....

I0 I1 Q0
---[]-- --[\]-- --()--

I0 I1 Q1
---[]-- --[\]-- --()--

The more advanced version, is that when I retract, I want to add a timer such that the retract solenoid stays open for, say 3 seconds, and then closes back up (don't need to keep air on it).

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 02:44 - 12 Jun 2015 02:48 #59720 by BigJohnT
I have some basic Classicladder info on my web site.

gnipsel.com/linuxcnc/ladder/index.html

When you open the Ladder Editor a couple of windows pops up. Click on Editor in the Section Display. Say you want to add a rung below the last rung, click on the last rung and it shows red bars on the side. Click Add in the Editor then your new rung shows up as well as all the things you can click on to add to the rung.

A simple latching run with a permissive bit would look kind of like this
----[ ]----[/]----[/]----------()
       |--[ ]--|
The first row would be the input that turns the output on if both next two inputs are off.
The next row is the latch and is the same as the output.
The first N/C contact is the permissive contact.
The second N/C contact is the one that will break the circuit.

In the more advanced version you have a timer that is turned on with the output and when it times out it breaks the seal in circuit.

JT
Last edit: 12 Jun 2015 02:48 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 20:41 - 12 Jun 2015 20:43 #59744 by tome

I have some basic Classicladder info on my web site.

gnipsel.com/linuxcnc/ladder/index.html

When you open the Ladder Editor a couple of windows pops up. Click on Editor in the Section Display. Say you want to add a rung below the last rung, click on the last rung and it shows red bars on the side. Click Add in the Editor then your new rung shows up as well as all the things you can click on to add to the rung.


Thanks JT, I have read your tutorials, very helpful. But when I go to write my own, confusion reigns.

A simple latching run with a permissive bit would look kind of like this
----[ ]----[/]----[/]----------()
       |--[ ]--|
The first row would be the input that turns the output on if both next two inputs are off.
The next row is the latch and is the same as the output.
The first N/C contact is the permissive contact.
The second N/C contact is the one that will break the circuit.


So I assume you are saying that this circuit works for my situation? If I label things:
   %I0     %I1     %I2         %B0
----[ ]----[/]----[/]----------()
            %B0
         |--[ ]--|

Then, given that to control the solenoids I have two Mesa outputs, tailstock-retract => hm2_5i25.0.7i84.0.0.output-09 and tailstock-extend => hm2_5i25.0.7i84.0.0.output-10 what do I put in the custom.hal file?
Can Mesa outputs be %I1 and %I2? And then is, say, tailstock-fwd then %I0?

Tom
Last edit: 12 Jun 2015 20:43 by tome.

Please Log in or Create an account to join the conversation.

More
12 Jun 2015 22:11 #59749 by BigJohnT
An input is %I0 and is the signal to do something. For example in your hal file you might have:
net open-collet classicladder.0.in-00 <= pyvcp.open 

Similarly the classicladder outputs are connected to you mesa output.

Run the turret example and you can see inputs and outputs in the hal file and watch them in ladder.

%B0 is a bit not an output, %Q0 is output 0.

JT

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum