Page 1 of 1

G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 5:28 am
by Robertspark
G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

M707 sets machine back to radius mode (basically halves X-axis steps per unit) and saves original setting for later reset
eg turning a part at X25 will create a part 25 units in diameter

M708 sets machine X axis to diameter mode (default) by resetting the X-axis steps per unit.
eg turning a part at X25 will create a part 50 units in diameter

M706 is the macroloop, because if you reset the machine, the macros will be cleared, hence if you press start or run from here you would also need to re-run the M707 to set the machine back into radus mode without it. The Macroloop allows the setting to be semi-modal (it is semi-modal, because if you turn the machine on and off / restart UCCNC the steps per unit will be restored to the orginal settings which are in diameter mode (i.e. turning a part at X25 will create a 50 unit diameter part)


Idea came from here:
http://linuxcnc.org/docs/html/gcode/g-c ... l#gcode:g7

Seems to work fine here, let me know any issues.

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 10:39 am
by Derek
Do the DROs reflect the change or only when code is run.

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 11:19 am
by Robertspark
Derek,

Should the X axis DRO change?

At the moment all the macro does is 1/2 the number of steps per unit when M707 has been sent, and then resets the number of steps per unit back when M708 has been sent.

{I can change the DRO's and I've probably got it wrong at the first attempt (I'll fire up LinuxCNC later on to give it at go as I wasn't sure if Mach3 had G7/G8 or something equivalent}

What should it do?

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 11:26 am
by Derek
In diameter mode if I move the X axis tool via mach .001" it actually only mechanically moves the tool .0005". The DRO reflects the .001" move though since the DRO is reflecting the diameter of the part.

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 12:07 pm
by Robertspark
Thanks Derek

Macroloop needs fixing to correct the DRO (double the X DRO under radius mode, and 1/2 it when flipping back to default Diameter mode), not a problem, I'll sort shortly, thanks for the feedback

{brain not quite there Saturday AM stuff with SWMBO, children yadayada... life!}

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Sat Oct 28, 2017 12:42 pm
by Robertspark
I think its now correct, appears to work here and makes sense to me

Only the macro loop required correcting the M707 and M708 macros are correct.

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Mon Oct 30, 2017 2:32 pm
by Derek
One question on this. I'm having trouble wrapping my head around diameter mode and how is it effecting feed rate on X. With Mach turn in diameter mode working in imperial a command of G01 X1 F1 moves the cross slide .5" and takes 30 seconds to complete. But it's not really cutting at 1 IPM since it's speed across the surface is .5 IPM. This probably isn't that big a deal for me since I never can seem to cut at recommended speeds and feeds anyway. In radius mode it moves the cross slide 1" in 1 minute. This could be normal when working in diameter mode or an error. I really don't know.

Re: G7 / G8 Diameter or Radius Mode (X-axis) Macro Emulate

PostPosted: Mon Oct 30, 2017 3:00 pm
by Robertspark
Maybe I've over complicated the macroloop.....

The attached revised macro loop removes the changes of units adjustment..... hence the feedrate should now be right

In hindsight I don't think I needed to fiddle with the steps just change the DRO which is what this macro update does.