[solved] Rehoming Lathespidle / Rotary-Axis from inside GCode

More
3 years 5 months ago #271983 by spumco

excellent thread guys, I'll look at caxis.comp and see if i can figure it out
 
NoJo's responded in his original thread I drug up... I suspect he will be able to shed some light on the whole shebang.  Might want to pay attention to that one, too.

Your insights are also, as usual, most welcome.  I tend to grab my popcorn and thinkin' cap when I see you post something.

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

More
3 years 5 months ago - 3 years 5 months ago #271987 by smc.collins
I am thinking about handling the c axis and spindle by controlling the encoder signal by using the enable for each, and then using macro's to force the rehoming of the axis or spindle orient on each enable. IE if spindle is enabled, call orient from a macro and  then have the output sent to the spindle encoder , when in c axis, the encoder output is sent out to C axis then macro calls home and resets encoder. at least, that what I have worked out in theory. This functionality really needs to be integrated into linuxcnc at it's core.
Last edit: 3 years 5 months ago by smc.collins.

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

More
3 years 5 months ago #271993 by spumco

 IE if spindle is enabled, call orient from a macro and  then have the output sent to the spindle encoder , when in c axis, the encoder output is sent out to C axis then macro calls home and resets encoder.
 
Do you think you need to orient the spindle?  I gather the C-axis homes every time it's enabled (like my Fanuc), but I don't see the need for spindle orient once a C-axis is available.

And, looking back through NoJo and Andy Pugh's discussion while they were working out the bugs, resetting the encoder on C-axis enable results in the C-axis immediately homing. 

I think this takes place in caxis.comp.

Maybe.

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

More
3 years 5 months ago #272012 by smc.collins
well, the index iirc is used by c and spindle, for m19 etc.

I'll try to get to testing in near future, busy working on my slv40 mill currently.

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

More
3 years 5 months ago #272016 by Aciera

resetting the encoder on C-axis enable results in the C-axis immediately homing.

As I see it the problem when switching from spindle mode back to rotary mode is to get the motor to match the commanded position of the rotary axis before the encoder was disconnected in the switch to spindle mode. If the commanded position does not match the encoder feedback a joint following error will occur when the encoder is reconnected. That is at least how I understand it.

Thus, in my opinion, just resetting the encoder count to the index is not enough since there is still a difference between the commanded position (which has not changed during spindle mode) and the newly reconnected encoder position simply because the motor is in a different position.
Using M19 in spindle mode seems the logical solution to orient the motor to where it was in rotary mode.
The question is, how accurate can the spindle be oriented using M19?
 

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

More
3 years 5 months ago - 3 years 5 months ago #272046 by Aciera
So it does seem that the caxis.comp is the component that I had remembered. Here is the whole saga, unfortunately the thread title is misleading:
forum.linuxcnc.org/10-advanced-configura...and?start=140#210682
Last edit: 3 years 5 months ago by Aciera.
The following user(s) said Thank You: spumco

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

Time to create page: 0.362 seconds
Powered by Kunena Forum