Moving to "home" before automatic toolchange

More
6 years 10 months ago #152954 by jochen91
Hi folks,

At the moment I’m trying to retrofit and old Weboturn CNC lathe. It uses an 8 pocket ATC. I've programmed a HAL component for the toolchanger which works already.

Today i've run the first test cnc program on the lathe and realized, that i would be a good idea to move the atc to home before a toolchange to avoid crashes.

I've remapped M6 to move to my home coordinates.
But now to the problem itself:
As soon as M6 gets typed into the MDI the z and x axis start moving. So far so good... but the ATC starts changing tools as well instantly.

What I want is, that the motion gets completed first, then the tool change.
I've attached my .ini / .hal / custom hal component and my macro for the remap. If anybody has an idea how to achieve my wish I would be really thankful.

I don't want the solve this proplem via the post processor in fusion360.

Kind regards,
Jochen

Please Log in to join the conversation.

More
6 years 10 months ago #152958 by Leon82

jochen91 wrote: Hi folks,

At the moment I’m trying to retrofit and old Weboturn CNC lathe. It uses an 8 pocket ATC. I've programmed a HAL component for the toolchanger which works already.

Today i've run the first test cnc program on the lathe and realized, that i would be a good idea to move the atc to home before a toolchange to avoid crashes.

I've remapped M6 to move to my home coordinates.
But now to the problem itself:
As soon as M6 gets typed into the MDI the z and x axis start moving. So far so good... but the ATC starts changing tools as well instantly.

What I want is, that the motion gets completed first, then the tool change.
I've attached my .ini / .hal / custom hal component and my macro for the remap. If anybody has an idea how to achieve my wish I would be really thankful.

I don't want the solve this proplem via the post processor in fusion360.

Kind regards,
Jochen



You need some type of in position pin to declare it's ready for tool change

Please Log in to join the conversation.

More
6 years 10 months ago #152959 by jochen91
Mhhh,

so you mean by checking in the hal component if axis.N.motor−pos−fb == i.e. desired position ?

Please Log in to join the conversation.

More
6 years 10 months ago #152961 by Leon82
I'm not sure exactly the syntax, but yes

In position,

Change tool

Please Log in to join the conversation.

More
6 years 10 months ago #152962 by jochen91
I will try this tomorrow and post if this has worked. Thank you!

Please Log in to join the conversation.

More
6 years 10 months ago #152972 by tommylight
Hove not done this in a while, but i think there is an option to set the toolchange position in the ini file, something like :
tollchange_position = x0 y0 z0
or whatever values.

Please Log in to join the conversation.

More
6 years 10 months ago #152977 by jochen91
Hi tommylight,

this should be by far the cleanest solution. Looked it up and indeed it is under the [EMCIO] Section. I will definitly give this a shoot and report my results. Pretty confident that this should work!

Thank you very much!

Please Log in to join the conversation.

More
6 years 10 months ago #152992 by jochen91
So i've tried the .ini solution and the one Leon82 suggested.

To make a long story short, the failure was on my side (as always ;) my hal component was running the whole time and started as soon as the requested tool number changed which happens as soon as M6 gets typed into the MDI.

But the request tool flag is only set, when M6 should be executed (which I didn’t check for).

So anyway… it works fine, besides one little problem. Im using the remap method cause the .ini method moves both axis simultaneously and I want to move x first then z.

If I run a demo g-code with some tool changes the ATC moves to the position in the g-code and does the change and not to the position mentioned in the remap.

Any idea would could be the problem?

The macro I posted in the first post is still the same.


Thanks in advance!

Please Log in to join the conversation.

Time to create page: 0.121 seconds
Powered by Kunena Forum