Problem with Z in a macro function

If you think you've found a bug post it here.

Problem with Z in a macro function

Postby Vmax549 » Wed Jan 17, 2018 2:33 am

This is a problem with a programable macro M20737. When the Z is suppose to Plunge down it only goes about 1/2 way then slows to a dead crawl while teh rest of teh code runs to completion. It will do it in ABS and Inc coding.

I commented the line where it acts up.

You program it as M20737 F20 {A1 B1 C.1 D.05 E0 H3 }

when you run it watch Z you can see it stops short and then creeps very slowly downward to full depth.

Thanks, (;-) TP

Note I just changed teh code a bit but the problem still exist.
Attachments
M20737.txt
(2.4 KiB) Downloaded 53 times
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Problem with Z in a macro function

Postby cncdrive » 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.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: Problem with Z in a macro function

Postby Vmax549 » Wed Jan 17, 2018 2:51 pm

Thank You Balazs for ALL you hard work.

While on the subject of macros is there ANY way to make teh Gcode in a macro display in teh toolpath.

I use these macros as a substitute for not being able to call a remote SUB. I really would rather program as a SUB but you cannot call a remote sub with
M98 {DrillCycle.sub} L1



(;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Problem with Z in a macro function

Postby cncdrive » Thu Jan 18, 2018 1:55 am

Thank You Terry.
It would be a large change in the software to make macro movement codes also displayed on the toolpath.
I don't think we can do that now, I mean it would require so much change that in what stage we are in with the development of other things it would be very unoptimal and risky for us to do this change too now.
cncdrive
Site Admin
 
Posts: 2253
Joined: Tue Aug 12, 2014 11:17 pm

Re: Problem with Z in a macro function

Postby Vmax549 » Thu Jan 18, 2018 2:20 am

OK (;-) Thanks, (;-) TP
Vmax549
 
Posts: 1274
Joined: Sun Nov 22, 2015 3:25 am
Location: USA


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 2 guests