Hello Guest it is November 15, 2019, 03:34:11 AM

Author Topic: Mach3 Rotary Axis: how to return to zero position from -500k degree position...  (Read 850 times)

0 Members and 1 Guest are viewing this topic.

Hi guys, bit of an unusual one here...

I am using Deskproto as a g-code generator,
on an x-carve modified with an A-axis.
running G-code for a tutorial you can find here:  https://www.deskproto.com/gallery/venus.php

On the clearing pass I am using a milling strategy called 'helix' where the g-code essentially runs from one end of the workpiece to the other in a long single pass.
sort of like Meg Ryan peeling the apple in Sleepless in Seattle, in one long cut of the knife...

On a test run I noted that the A axis accumulated a very significant value, on the order to -500k, after about 50% of the g-code lines.
It made me wonder how I will be able to set the axis to zero when the run is finished,
without having to 'rewind' all those turns, which is what would happen if I simply issue a command for 'g0 a0'

anybody have any advice on how to return to zero easily when the A axis value is significant?
Thanks in advance for any help...

 

Online Tweakie.CNC

*
  • *
  •  7,996 7,996
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Some Gcode you could try...

G1 A *********x  (where *********x is a multiple of 360 and a number close to the existing A axis DRO reading)
#99803=0
%

This should rotate the A axis to a multiple of the zero position with minimum rotation then reset the A axis DRO to zero.
You could then goto zero on the other axes in the usual way.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Possibly rework your code to work in incremental rather than absolute coordinates g91/g90

HTH

RT
Yes it would be nice to know how to do this as it would allow threading on my fourth axis which is stepper driven. The threading ‘tool’ could be a lathe tool or the mill spindle with a shaped cutter.

Offline RICH

*
  • *
  •  7,370 7,370
    • View Profile
Add the following  M1010.M1S file to the the     C:/Mach3/macros/ Mach3Mill    
folder ( the folder represents the profile you are using).
When you input M1010 in the MDI line it will zero the X,Y,Z A axes and also set the work
offsets to zero. Place a comment mark in front of any line in the M   code which you do want
to use ie;    ' SetMachZero ( 0 )  or    ' Code "G92.1"   .
Change the G10 command  to     G10 l2 P1 A0   if you only want to reset the A  axis work offset.

RICH
« Last Edit: April 27, 2018, 06:40:48 AM by RICH »