Re: Problem with Z in a macro function
Posted: Wed Jan 17, 2018 4:40 am
I have tested your macro and really there is a bug in the Macro executer in the case when G91 is used and G2/3 arc is executed in the macro and one or more coordinates are not defined.
So, there is a bug, however the issue does not happen in absolute G90 mode, only in G91.
You could temporarily fix the problem with defining all XYZ coordinates for the arc when executing it in macro and when in G91.
This is the line which causes the problem: exec.Code ("G2 X0 I-" + CircleRadius +" F"+FeedRate );
You could fix it like: exec.Code ("G2 X0 I-" + CircleRadius +" Z0 F"+FeedRate );
So, adding a Z0 in G91 incremental mode means null Z movement. If the Z is defined then the problem does not happen.
And we will fix this issue soon.
And BTW there is also an issue in the latest test release about the G91 in normal G-code execution when the G41/G42 radius comp is enabled, I think you reported that issue too and we already corrected that, but still working to release it in the coming version 1.2102.
So, there is a bug, however the issue does not happen in absolute G90 mode, only in G91.
You could temporarily fix the problem with defining all XYZ coordinates for the arc when executing it in macro and when in G91.
This is the line which causes the problem: exec.Code ("G2 X0 I-" + CircleRadius +" F"+FeedRate );
You could fix it like: exec.Code ("G2 X0 I-" + CircleRadius +" Z0 F"+FeedRate );
So, adding a Z0 in G91 incremental mode means null Z movement. If the Z is defined then the problem does not happen.
And we will fix this issue soon.
And BTW there is also an issue in the latest test release about the G91 in normal G-code execution when the G41/G42 radius comp is enabled, I think you reported that issue too and we already corrected that, but still working to release it in the coming version 1.2102.