G68 alignment macro

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

G68 alignment macro

Postby Delco » Wed Jan 08, 2020 5:50 am

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 ?
Delco
 
Posts: 73
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby Delco » Thu Jan 09, 2020 5:54 am

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.
Delco
 
Posts: 73
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby Robertspark » Thu Jan 09, 2020 7:59 am

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
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2110, Neuron Lite
UCCNC v1.2110 Macro Manual
Robertspark
 
Posts: 1552
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: G68 alignment macro

Postby Robertspark » Thu Jan 09, 2020 9:14 am

Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2110, Neuron Lite
UCCNC v1.2110 Macro Manual
Robertspark
 
Posts: 1552
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

Re: G68 alignment macro

Postby Delco » Thu Jan 09, 2020 9:38 am

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.
Delco
 
Posts: 73
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby Delco » Thu Jan 09, 2020 10:16 am

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
Delco
 
Posts: 73
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby dezsoe » Thu Jan 09, 2020 11:09 am

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.
dezsoe
 
Posts: 1009
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: G68 alignment macro

Postby Delco » Fri Jan 10, 2020 11:11 pm

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.
Delco
 
Posts: 73
Joined: Tue Apr 02, 2019 4:23 am

Re: G68 alignment macro

Postby dezsoe » Sat Jan 11, 2020 7:45 am

OK, sorry, I couldn't make it yesterday, but I'll try to do my best.
dezsoe
 
Posts: 1009
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: G68 alignment macro

Postby Vmax549 » Sat Jan 11, 2020 7:17 pm

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
Vmax549
 
Posts: 274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Next

Return to Macros

Who is online

Users browsing this forum: No registered users and 1 guest