Setting up a tool changer

More
20 Jan 2012 13:32 #16980 by andypugh
BigJohnT wrote:

Is this one of those tool changers that you always go one direction to a point that is calculated based on the current tool position and the requested tool position then back up a bit to a hard stop? I forget the name MyFord or something like that...


Boxford, maybe. You clearly need to study www.lathes.co.uk more carefully.

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

More
20 Jan 2012 13:51 #16981 by BigJohnT
Oh, I just read back and you do have an encoder and a locked indicator so you would need the encoder part of my hal... I'll be gone most of today but can help you sort it out in a logical manor this weekend. I would get the encoder to return the proper number first.

John

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

More
20 Jan 2012 15:54 #16982 by fferraz
Guys, again, thanks a lot for your attention, it really means a lot...

BigJohnT wrote:

Is this one of those tool changers that you always go one direction to a point that is calculated based on the current tool position and the requested tool position then back up a bit to a hard stop? I forget the name MyFord or something like that...

John


Nope, it was custom made... it indeed uses a micro controller that receives the pulses and execute the changes, as andy said.

And also, yes, we do have a position encoder and a locked indicator. I'll try to take some pictures of my machine later so that you can understand it better too.

I also will be gone for the afternoon so I can't work on this right now, but what I wanna do is study a little bit the classicladder interface and logic and try to implement my VBscript code on it.

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

More
25 Mar 2012 19:24 #18789 by fferraz
Hey BigJohnT, sorry about not responding this thread for so long, buit we decided to completely change the drivers on our lathe so we had a lot of work to do before getting back to programming.

What I need now is the same thing I was needing 2 months ago when we first talked.

I'm using parallel port pin 16 as the "enable" signal. (it has to be 1 while the change is being done).
And pin 17 is where I send the tool number, so if the tool is 5 I send 5 pulses there.
After the change is done, my driver will send the "change done" bit to parallel port pin 10.

Could you help me do that in classicladder?

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

More
25 Mar 2012 20:17 #18791 by BigJohnT
The first thing to do is write down line by line what you want the ladder to do in plain words.

For example
If tool number requested is not the same as the current tool initiate a tool change.
...
If tool change is complete and successful tell EMC that the tool change is done.

John

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

More
26 Mar 2012 18:47 - 26 Mar 2012 18:49 #18810 by fferraz
Ok, let's go... I don't know if the way I described the sequence is the best way to use it in Ladder, but you'll get the idea:
If tool number requested is not the same as the current tool, initiate a tool change.
Activate parallel port pin 16
Declare variable A == 0
While tool number requested > A do:
  Activate parallel port pin 17
  Wait (50 miliseconds)
  Deactivate parallel port pin 17
  A == A + 1
  End  While
When A = tool number requested, exit loop
Deactivate parallel port pin 16
Wait for input from parallel port pin 10 saying that the change is completed
Return tool change done
Last edit: 26 Mar 2012 18:49 by fferraz.

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

More
26 Mar 2012 19:56 #18811 by BigJohnT
Looking good, I'm not sure how it works if you set A to 0 each time it is called. Lets look at the tool change part a bit in detail, and I might change your terminology a bit to be a bit clearer to me and closer to ladder logic.
if tool change is true turn on parallel pin 16
if tool change is true start timer 1 (preset 50ms)
if timer 1 is on turn on parallel pin 17
if timer 1 is done 
    and tool requested is equal to current tool
    and parallel pin 10 is on return tool change done
if timer 1 is done and tool requested is not equal to current tool reset timer 1

The part that is sketchy to me is how do you know what tool is current after each move?

John

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

More
26 Mar 2012 20:08 #18813 by fferraz
You don't know... I don't take the information of the current tool from my machine, my driver is the one taking care of all the change.

That's why I used the increasing variable A, because I need the parallel pin 17 to pulse as many times as my tool number, so if T6 is called, it should loop 6 times, without readying anything from my machine.

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

More
26 Mar 2012 21:21 #18817 by BigJohnT
Ah! in that case you just use a counter and a timer and put the tool number in the preset of the counter. It is much more clear to me know...

John

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

More
09 Apr 2012 21:03 #19059 by fferraz
BigJohnT, I'm starting to write my ladder program, I managed to understand it a little bit.

You said I should put the requested tool number in the preset of the counter. I don't understand how can I do that. I've linked iocontrol.0.tool-prep-number with classicladder.0.s32in-01 on my custom.clp file, so I've tried to put %IW1 as the preset of the timer but it doesn't accept it. Is that the way or am I missing something here?

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

Time to create page: 0.267 seconds
Powered by Kunena Forum