Page 1 of 6

G68 alignment macro

PostPosted: Wed Jan 08, 2020 5:50 am
by Delco
Does anyone have a macro for probing along a axis for a angle error and then writing the g68.g69 commands to a gcode file ? they are willing to share or is this already built into the software ?

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 5:54 am
by Delco
Would it be possible for a gcode program to call a macro asking for a input of degrees that could then we written to a line in the gcode such as g68 x0y0 r(inputvalue) ? ideally I would like to get the fusion 360 probing routines to work with uccnc but that looks like a huge effort.

My workflow would be to do a probe to find the angle error and then once the gcode is started to input that error in each time.

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 7:59 am
by Robertspark
With g68 the gcode is not changed

G68 rotates the work coordinates on the machine.

I may be wrong but I don't think you understand how g68 works. It has nothing to do with fusion and the gcode output by fusion. It just corrects / alters the work coordinates on the machine and rotates the coordinates about an axis point you choose on the machine

If you write your own gcode and have a pattern you wish to repeat you can use g68 to rotate and repeat this gcode but this is not something fusion would do in my little experience

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 9:14 am
by Robertspark

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 9:38 am
by Delco
Robert I understand how the g68 gcode works , it rotates the xy co ordinates by a angle , and is set by a g68 command with centre of rotation xy point and rotation amount value r.
To gain that rotation value R we either need to be able to use the fusion 360 probe angle along axis or do a angle probe within uccnc and then insert that R value into the Gcode.

I just dont know how to achieve it other than to manually edit the gcode everytime and then reload it .

one thing I havent tried is to issue the g68 x0y0 r? via the mdi - am worried that inital setup commands will wipe it.

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 10:16 am
by Delco
Using fusion360 probing to set g68


https://youtu.be/Hxmh76dDgEs

And how to do it using f360
https://youtu.be/XgZY4-oUXGo

I just dont know how we can get it to work in uccnc

Re: G68 alignment macro

PostPosted: Thu Jan 09, 2020 11:09 am
by dezsoe
He made a special F360 postprocessor for PathPilot probing. I downloaded the post and it's very interesting. It needs much time to completely understand how it works, but it would be a good idea to apply it to the UCCNC post. :)

Hopefully I'll have time tomorrow to write you a macro to measure the angle and rotate the workpiece.

Re: G68 alignment macro

PostPosted: Fri Jan 10, 2020 11:11 pm
by Delco
dezsoe wrote:He made a special F360 postprocessor for PathPilot probing. I downloaded the post and it's very interesting. It needs much time to completely understand how it works, but it would be a good idea to apply it to the UCCNC post. :)

Hopefully I'll have time tomorrow to write you a macro to measure the angle and rotate the workpiece.


Thank you , happy to test anything you come up with . the probing routines for angle work really well in the current screenset , just need a way to insert the g68 and g69 commands



would be a great idea if there was a repository of current uccnc post processors that work here on the forum.

Re: G68 alignment macro

PostPosted: Sat Jan 11, 2020 7:45 am
by dezsoe
OK, sorry, I couldn't make it yesterday, but I'll try to do my best.

Re: G68 alignment macro

PostPosted: Sat Jan 11, 2020 7:17 pm
by Vmax549
UCCNC can already calculate the angle . It just needs to push that value to a # var say #4000. Then from either MDI call M68 Xxx Yyy R#4000 OR apply teh Gcode call directly into your Gcode file.


(New Gcode File)
G50 G90 G80 G94
G68 Xxx Yyy R#4000 (Rotate Coord base)
etc
etc

Just a thought , (;-) TP