Resetting Rotary Axis to Zero

More
8 years 4 months ago #112776 by Sparky961
Yes, this does seem to be the standard answer. Although it strikes me as being too similar to the Y2K fiasco, and not at all an elegant solution. It is, however, a workable solution and the one I've settled on so as not to be sidetracked by something that isn't an immediate problem.

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

More
8 years 4 months ago - 8 years 4 months ago #112784 by Badger
I haven't tried this yet but I assume it will work and be of great benefit to my particular situation. My question is why/how does it work? I've looked the DOCs and googled it but its still as clear as mud to me.

So I tried it in a sub-routine at the end of a sub-path and it works! It seems to mathematically take away all full 360 degree rotations and leaves the remainder, a big help. I like to get back to zero so I can visually make sure nothing wonky happened since I don't fully trust my mechanics, so I just add "G0 A0" to the sub-routine and it essentially homes. Fantastic! and Thanks!
Last edit: 8 years 4 months ago by Badger.

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

More
8 years 4 months ago #112824 by andypugh

Badger wrote: I haven't tried this yet but I assume it will work and be of great benefit to my particular situation. My question is why/how does it work? I've looked the DOCs and googled it but its still as clear as mud to me.


The key sections are:
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g10-l20
linuxcnc.org/docs/2.7/html/gcode/overvie...:numbered-parameters
linuxcnc.org/docs/2.7/html/gcode/overvie...ode:binary-operators (though that does rather assume that you already know what the modulus operator does)
The following user(s) said Thank You: joekline9, Badger

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

More
6 years 5 months ago #168977 by cadcam

MaHa wrote: I use this to prevent unwind A-axis:

G10 L20 P#5220 A[#5423 MOD 360]


This is excellent. Thank you. For fusion users, just add -
/* Set to A0 and prevent unnecessary unwind */
writeBlock(
gMotionModal.format(0),
conditional(abcFormat.format(abc.x) == 0, "G10 L20 P#5220 A[#5423 MOD 360]")
);

Cheers
The following user(s) said Thank You: joekline9, Shu

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

More
5 years 3 months ago #215972 by Nbabka
Where do I put
writeBlock(
gMotionModal.format(0),
conditional(abcFormat.format(abc.x) == 0, "G10 L20 P#5220 A[#5423 MOD 360]")
);


I can't find anywhere in the post that this will work

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

More
5 years 3 months ago #216529 by andypugh
I would suggest searching the post for where it writes the "M2" and put it before that.

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

Time to create page: 0.375 seconds
Powered by Kunena Forum