Page 1 of 2

G02 and G03

PostPosted: Sun Sep 13, 2020 3:47 am
by skovnesky
I'm trying to write g code using G02 and G03 with variables commands. It won't let me use a variable for the Z end position. The x end works fine. When I try to use a variable for Z UCCNC version 1.2111
will not load the program back from editor. It doesn't show any error just won't load program until I put the number back in then it works fine.

Re: G02 and G03

PostPosted: Sun Sep 13, 2020 4:35 am
by Robertspark
can you show the actual examples of what works and what does not work

Re: G02 and G03

PostPosted: Sun Sep 13, 2020 4:47 pm
by skovnesky
This is the G code that works. When I replace the numbers for Z with the variable #2 then it doesn't. thanks

Re: G02 and G03

PostPosted: Sun Sep 13, 2020 4:51 pm
by ger21
It would be much better if you post the code that DOESN'T work.
And what version of UCCNC you are using.

Re: G02 and G03

PostPosted: Sun Sep 13, 2020 6:44 pm
by skovnesky
This is the one that doesn't work. I'm using version 1.2111

Re: G02 and G03

PostPosted: Sun Sep 13, 2020 7:42 pm
by dhanger
Looks like you need a G18 for an arc in the XZ plane?

Re: G02 and G03

PostPosted: Mon Sep 14, 2020 12:36 am
by skovnesky
I do have a G18 at top of g code

Re: G02 and G03

PostPosted: Mon Sep 14, 2020 5:24 am
by dhanger
Oops, sorry. I'm so used to my programs having several lines of comments at the top I just passed right over it.

Re: G02 and G03

PostPosted: Mon Sep 14, 2020 7:32 am
by Robertspark
I can see there is a problem (is it doesn't work if you change Z-0.250 for Z#2)

but I cannot see why it does not work or allow the file to even load (I tried a few things to get it to work + load)

but just a side note, looking at the cut paths, I think you are going to suffer from tool rubbing because of the thinning of the cut path at the end of the cut.

Re: G02 and G03

PostPosted: Mon Sep 14, 2020 10:35 am
by dezsoe
It seems to be a bit complicated. (I tested on both 1.2113 and 1.2049.)

If I change Z to Y and go back to the G17 plane then all works fine:

G17var.png

If I load the original (bad) code and put a G17 before the M30 then it displays with the Z#2, but the arcs are in the bad direction and also leaving the X-Z plane:

G18andG17.png
G18andG17.png (7.49 KiB) Viewed 10070 times

If I use the original (bad) code and change Z#2 to Z-.250 then the arcs are in the X-Z plane:

G18number.png
G18number.png (10.64 KiB) Viewed 10070 times