IJK Arc radius tollerance error

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

IJK Arc radius tollerance error

Postby hmnijp » Fri Jan 17, 2025 1:22 pm

I recently encountered a CAM that generated incorrect G2/G3 without swapping g17/18 and misplacing IJK. When loading this code into Uccnc I did not get the 'arc radius tolerance error' error.

I made test codes and found that the error is only detected for R arcs, but for IJK arcs there is no check for arc accuracy, the cnc is doing the wrong g-code, doing spiral interpolation with a big difference between r1 and r2.
2025-01-17 16-45-12.jpg


I looked in the documentation and it also says that the check is done for R arcs.
Is there any reason why you wouldn't check abs(r2-r1)<=arc radius tolerance for IJK?



I have also looked at how other industrial controllers handle this:
Fanuc has a strict check for all arcs (parameter #2410, error PS191 Over tolerance of radius), Sinumerik, Mazak, Mitsubishi, HNC, LinuxCNC have a similar strict check for arcs.
photo_2025-01-15_09-52-34.jpg


I also looked at how others do spiral interpolation - many cnc use a separate g-code for this, e.g. g2.1/g3.1 XYZ IJK P or INVCW/INVCCW in the case of Sinumerik - so it is described in the same way as a g2 arc, but without the radius difference check.
2025-01-15 10-19-46.jpg



If you haven't thought of this, I thought you could fix the ijk radius check - to avoid damaging machines with wrong g-code, and add g2.1/g3.1 without the check, as it seems the spiral interpolation works correctly.
hmnijp
 
Posts: 46
Joined: Sun Jan 17, 2021 12:59 am

Re: IJK Arc radius tollerance error

Postby cncdrive » Fri Jan 17, 2025 5:10 pm

The arc radius is not checked for IJK mode because IJK mode clearly defines the arc start point (end of previous movement or current position in other words) and the IJK is the shift from that point and the endpoint is also defined with XYZ.
So, with IJK mode the arc is always clearly defined and so there is no "accuracy".

With R mode it is possible to define too small radius when the radius is smaller then the difference of the starting point minus the endpoint per 2.
cncdrive
Site Admin
 
Posts: 5163
Joined: Tue Aug 12, 2014 11:17 pm

Re: IJK Arc radius tollerance error

Postby hmnijp » Fri Jan 17, 2025 8:14 pm

OK, so I mistakenly assumed that the check in your system does the same thing as a similar function in many industrial CNCs - checks that the arc is an arc and not a spiral or some other misinterpretation of the G-code.

Don't you think you should add a check for all cases?

This would avoid errors caused by incorrect g-code, for example in cases where the arc centre coordinates use absolute coordinates instead of incremental coordinates. Users may run such code without noticing the difference.
hmnijp
 
Posts: 46
Joined: Sun Jan 17, 2021 12:59 am

Re: IJK Arc radius tollerance error

Postby cncdrive » Fri Jan 17, 2025 9:00 pm

Yes, we could check, but there was a discussion about this earlier when we agreed that we will allow spiral interpolation too.
In UCCNC absolute arc center is not allowed, only incremental mode is supported.
cncdrive
Site Admin
 
Posts: 5163
Joined: Tue Aug 12, 2014 11:17 pm


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 3 guests