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

While UCCNC does not currently have a TURN Modual Here is the place to discuss your wants and wishes for TURN

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

Postby Robertspark » Sat Oct 28, 2017 5:28 am

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.
Attachments
M708.txt
M708 - Clear G7 Emulation Macro (back to default Radius mode)
(743 Bytes) Downloaded 1209 times
M707.txt
M707 - G7 Emulation Macro
(743 Bytes) Downloaded 1209 times
M706.txt
M706 Macroloop for G7 / G8 Emulation
(1.74 KiB) Downloaded 1176 times
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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

Postby Derek » Sat Oct 28, 2017 10:39 am

Do the DROs reflect the change or only when code is run.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

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

Postby Robertspark » Sat Oct 28, 2017 11:19 am

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?
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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

Postby Derek » Sat Oct 28, 2017 11:26 am

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.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

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

Postby Robertspark » Sat Oct 28, 2017 12:07 pm

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!}
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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

Postby Robertspark » Sat Oct 28, 2017 12:42 pm

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.
Attachments
M706.txt
G7 / G8 Macroloop, revised for X DRO correction
(2.25 KiB) Downloaded 1225 times
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

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

Postby Derek » Mon Oct 30, 2017 2:32 pm

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.
Derek
 
Posts: 341
Joined: Mon Sep 05, 2016 9:57 am

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

Postby Robertspark » Mon Oct 30, 2017 3:00 pm

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.
Attachments
M706.txt
(2.38 KiB) Downloaded 1157 times
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm


Return to UCCNC TURN (CNC Lathe)

Who is online

Users browsing this forum: No registered users and 1 guest