Bug with drilling translate.

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Bug with drilling translate.

Post by tigermm »

I'm using the GRBL post with drilling cycle translation on, and have noticed something odd.

I'm doing 4 holes using peck drilling, 2mm pecks down to 25mm.
So the code starts:
...........
G0 X42.500 Y42.500
G0 Z20.000
(G83 X42.500 Y42.500 Z-25.000 F1000.000 Q2.000 R0.000)
G0 X42.500 Y42.500
G1 Z0.000 F1000.00
G1 Z-2.000 F1000.00
G0 Z0.000
G0 Z-1.900
G1 Z-4.000 F1000.00
.......... etc down to 25mm, then at the last peck
G0 Z-23.900
G1 Z-25.000 F1000.00
G0 Z0.000 ................. it moves to Z0
G0 X42.500 Y157.500 ... then across to the next hole, touching the cutter the whole way
G0 Z20.000 ............... THEN up to clearance height
(G83 X42.500 Y157.500 Z-25.000 F1000.000 Q2.000 R0.000)
G0 X42.500 Y157.500 ....then wants to move to the same spot again

So basically the following 2 lines are superfluous
G0 Z0.000
G0 X42.500 Y157.500

Interestingly the moves at Z0 are not shown on the paths when generated (attachment), but they do show in the simulation.

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.28567 (Git)
Build type: Release
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/New Zealand (en_NZ)
Installed mods: 
  * A2plus
  * CurvedShapes
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: Bug with drilling translate.

Post by freman »

the moves at Z0 are not shown on the paths when generated (attachment)
I don't see an attachment.

Are you saying that the XY move at z0 is NOT in the Gcode output by the grbl post-processor ? Where does the code which you clipped above come from ?

NB. The sim is not that reliable from what I have found.
Last edited by freman on Tue Apr 05, 2022 1:07 pm, edited 2 times in total.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: Bug with drilling translate.

Post by tigermm »

Fail :lol: attachment below.
The moves at Z0 are in the Gcode from the post processor, but not shown in the path preview i.e. it's the drilling cycle translation that's the issue.
When looking more closely at the sim on the slowest speed I can also see it happening. In this case it's more reliable than the path preview!

It happened with the part I'd designed, and again when I just made a random square with 4 holes in it as a test.
Capture.JPG
Capture.JPG (38.46 KiB) Viewed 1716 times
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: Bug with drilling translate.

Post by freman »

Can you attach the FCStd for the 4 hole test, so that I can examine what condition is causing this?

Hmm, something has changed here. I always seem to get a retract height of 1mm in the G83, despite what I enter in the path setup.
I like to use a retract of -1mm to prevent the drill doing multiple re-entries into the work. If it was doing this before I would have noticed.

I'll have a look when you post the FCStd.

Also seeing this spurious output on console, anyone been poking around in here recently ?

Code: Select all

post: grbl(~/test.nc, --translate_drill)
Post Processor: grbl_post postprocessing...
 F120.00

 F120.00

Done postprocessing.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Bug with drilling translate.

Post by GeneFC »

I do not believe the simulator understands G83.

The only real test is to look carefully at the G-code.

Gene
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: Bug with drilling translate.

Post by freman »

Agreed, sim sucks.

The Gcode is not right because it does not seem to take account of retract param. This is new. Thanks to OP for flagging this.

If R is not right, the post proc will not produce right output either.

I'd still like OP's FCStd.

Here is a test file. It looks like neither the peck retract nor the pech depth are respected. Some new breakage here.
Attachments
drill-test.FCStd
(20.24 KiB) Downloaded 28 times
Last edited by freman on Tue Apr 05, 2022 6:42 pm, edited 2 times in total.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Bug with drilling translate.

Post by sliptonic »

GeneFC wrote: Tue Apr 05, 2022 1:59 pm I do not believe the simulator understands G83.

The only real test is to look carefully at the G-code.
You can also turn on the nodes to see the peck heights...
2022-04-05_13-18.png
2022-04-05_13-18.png (155.4 KiB) Viewed 1615 times
User avatar
freman
Veteran
Posts: 2201
Joined: Tue Nov 27, 2018 10:30 pm

Re: Bug with drilling translate.

Post by freman »

Gene: agreed, sim sucks.

The Gcode is not right because it does not seem to take account of retract param. This is new. Thanks to OP for flagging this.

If R is not right, the post proc will not produce right output either.

I'd still like OP's FCStd.

Here is a test file. It looks like neither the peck retract nor the peck depth are respected. Some new breakage here.


@Russ4262
dang , how do I ping someone on this forum ?!
Attachments
drill-test.FCStd
(20.24 KiB) Downloaded 18 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Bug with drilling translate.

Post by GeneFC »

freman wrote: Tue Apr 05, 2022 6:08 pm Agreed, sim sucks.
You did not agree with me. The simulator serves a very useful purpose.

Yes it could be improved, but the same holds for all of us. :lol:

Gene
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: Bug with drilling translate.

Post by tigermm »

Part attached. As said though it also happens for me with a square plate with 4 holes in it.
Attachments
750 poleski unit intake flanges.FCStd
(98.31 KiB) Downloaded 22 times
Post Reply