faulty pecker

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
freman
Posts: 1176
Joined: Tue Nov 27, 2018 10:30 pm

faulty pecker

Postby freman » Tue Jul 14, 2020 3:04 pm

It think there are some features of drilling paths which could be better.

Firstly, if I select a circular edge and click drilling path icon, I get all the holes it can find added automatically. If I selected one hole, I want one hole not ten. If I select a pair of holes, I want those two, not ten. Why is this trying to think for me instead of doing what I selected in the UI ?

If I selected a face, grabbing anything it can find on that face may arguable be useful. But when one hole is selected, this is not helpful, since I selected a single hole. There is not even a button to clear the geometry list, since what is usually the clear button in other 2.5D tools has been re-purposed as "reset" which it the grab everything option. Reset does the opposite of what I expected.

secondly: selecting a peck cycle in the UI disables the dwell option. These should not be mutually exclusive. A dwell time is also an option for a peck drilling cycle.

A note on labels : "Retraction" is unclear, it sounds like a relative move. The R option is "Retraction Height". It would be better if that was what the label read.


https://www.cnccookbook.com/g81-g73-g83 ... ned-cycle/
A typical G83 looks like this:

G83 XYZ R P Q F L
XY: Coordinates of the hole
Z: Hole bottom
R: Retract position in Z. Motions from initial Z to R are performed at rapids speeds. From R to hole bottom is done at feed speed.
P: Dwell time at bottom of hole.
Q: Depth to increase on each peck.
F: Cutting feedrate
L: Number of repeats

OS: Fedora 31 (Thirty One) (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21806 (Git)
Build type: Release
Branch: master
Hash: 68b98f5ffead8d90b2e9f6308ca55acefd758352
Python version: 3.7.7
Qt version: 5.13.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
User avatar
Wsk8
Posts: 120
Joined: Fri Dec 07, 2018 6:24 pm

Re: faulty pecker

Postby Wsk8 » Tue Jul 14, 2020 4:20 pm

freman wrote:
Tue Jul 14, 2020 3:04 pm
It think there are some features of drilling paths which could be better.

Firstly, if I select a circular edge and click drilling path icon, I get all the holes it can find added automatically.
This is already known. I thought etrombly or Russ are working on it?

freman wrote:
Tue Jul 14, 2020 3:04 pm
secondly: selecting a peck cycle in the UI disables the dwell option.
Because it's correct this way according to NIST.
nist.png
nist.png (24.62 KiB) Viewed 357 times


Even your linked site states this:
cnc.png
cnc.png (10.39 KiB) Viewed 357 times
User avatar
sliptonic
Posts: 1834
Joined: Tue Oct 25, 2011 10:46 pm
Contact:

Re: faulty pecker

Postby sliptonic » Tue Jul 14, 2020 4:32 pm

freman wrote:
Tue Jul 14, 2020 3:04 pm

secondly: selecting a peck cycle in the UI disables the dwell option. These should not be mutually exclusive. A dwell time is also an option for a peck drilling cycle.
Not true. LinuxCNC and other controls don't support dwell on a G83 which is why we disable it. Some controls do support it but it's inconsistent even what it means to dwell on peck. Some controls dwell on each peck, some dwell only on the last.

I've been learning about G73 cycles though and this is something that we should look at closer.

Your points about the hole selection are spot-on. Hole selection has bugged me for a long time.
User avatar
freman
Posts: 1176
Joined: Tue Nov 27, 2018 10:30 pm

Re: faulty pecker

Postby freman » Tue Jul 14, 2020 5:39 pm

Thanks wsk8, do you have a link for a NIST document? I gave up after about 10 failed links from Google. The cookbook is not exactly authoritative but he must be paying Big G lots of advertising, his site is always well up for anything about CNC. The table does seem to contradict the written description.

@Slip', yes the flexibility of G73 would be nice. Didn't want to be too greedy though !
LinuxCNC and other controls don't support dwell on a G83 which is why we disable it. Some controls do support it but it's inconsistent even what it means to dwell on peck. Some controls dwell on each peck, some dwell only on the last.
Caveat emptor! If you specify a dwell and your controller does not implement it, don't be surprised. But that could be fixed in post processor. That does not seem to be a reason for preventing all from using it ( assuming it is legit ).

PS got some doc thanks wsk8 chapter ref:

https://tsapps.nist.gov/publication/get ... _id=823374
User avatar
freman
Posts: 1176
Joined: Tue Nov 27, 2018 10:30 pm

Re: faulty pecker

Postby freman » Tue Jul 14, 2020 5:57 pm

Ah ! this is why I started looking into this in the first place:
2. Rapid back out to the clear_z.
3. Rapid back down to the current hole bottom, backed off a bit.
It has always bugged me all the slow feeds when not cutting on peck cycles. I wondered how it was defined but had not been able to get a definite answer.

It seems Gautier's excellent [ drill cycle expansion for ] GRBL post processor needs to be tweaked to fast down to just before the previous end of drilling.

I could not see how production guys would be putting up with cutting air at metal cutting speeds but you never know how the official spec was chosen or what corner case you were not accounting for with these things.
Last edited by freman on Tue Jul 14, 2020 8:51 pm, edited 1 time in total.
User avatar
sliptonic
Posts: 1834
Joined: Tue Oct 25, 2011 10:46 pm
Contact:

Re: faulty pecker

Postby sliptonic » Tue Jul 14, 2020 7:58 pm

freman wrote:
Tue Jul 14, 2020 5:39 pm
LinuxCNC and other controls don't support dwell on a G83 which is why we disable it. Some controls do support it but it's inconsistent even what it means to dwell on peck. Some controls dwell on each peck, some dwell only on the last.
Caveat emptor! If you specify a dwell and your controller does not implement it, don't be surprised. But that could be fixed in post processor. That does not seem to be a reason for preventing all from using it ( assuming it is legit ).
I disagree with this approach. If it's implemented as a feature, it should produce valid gcode for all standard posts, especially linuxcnc which is our reference postprocessor. If we implemented this and it doesn't work for linuxcnc, it would IMMEDIATELY be reported as a bug. If someone wants dwell-on-peck drilling, they could add a dressup to provide that functionality or add a feature to their own post.
User avatar
freman
Posts: 1176
Joined: Tue Nov 27, 2018 10:30 pm

Re: faulty pecker

Postby freman » Tue Jul 14, 2020 8:29 pm

I've just tweaked the GRBL post processor to do rapid descents:

Code: Select all

(Begin Drilling)
G0 Z3.000
G90
G99
(G83 X-7.500 Y-12.000 Z-5.000 F120.000 Q3.000 R1.000)
G0 X-7.500 Y-12.000
G0 Z3.000
G0 Z1.000
G1 Z-2.000 F120.00
G0 Z1.000
G0 Z-2.000
G1 Z-5.000 F120.00
G0 Z1.000
(G80)
G0 Z2.000
(G83 X-7.500 Y12.000 Z-5.000 F120.000 Q3.000 R1.000)
G0 X-7.500 Y12.000
G0 Z2.000
G0 Z1.000
G1 Z-2.000 F120.00
G0 Z1.000
G0 Z-2.000
G1 Z-5.000 F120.00
G0 Z1.000
(G80)
The one thing I'm unsure about is "backed off a bit". Surprisingly slack language if that is supposed to be a NIST standard.

Is it safe to drive rapids back to last point of contact ? If not, what does a general "a bit" look like in mathematical terms?

Would a %age of the depth of the drilling path be suitable ?

Code: Select all

 A_BIT = ( RETRACT_Z - drill_Z ) * 0.01
??

Code: Select all

 A_BIT = (drill_Step ) * 0.03
??

The latter is probably better, any thoughts?
User avatar
freman
Posts: 1176
Joined: Tue Nov 27, 2018 10:30 pm

Re: faulty pecker

Postby freman » Wed Jul 15, 2020 10:00 pm

I hardcoded 3% of the user's peck depth as the pull-off when doing a rapid back down to last drilled depth.

Code: Select all

   a_bit = drill_Step  * 0.03 
this produces an expansion of G83 like this:

Code: Select all

(Begin Drilling)
G0 Z3.000
G90
G99
(G83 X-7.500 Y-12.000 Z-7.000 F120.000 Q3.000 R1.000)
G0 X-7.500 Y-12.000
G0 Z1.000
G1 Z-2.000 F120.00
G0 Z1.000
G0 Z-1.910
G1 Z-5.000 F120.00
G0 Z1.000
G0 Z-4.910
G1 Z-7.000 F120.00
G0 Z1.000
(G80)
G0 Z2.000
Looks good for my needs. Any point in submitting a PR for this? Is that 3% solution sufficiently general?

Here is a quick demo of a proper pecker from above code. The time gained in not watching this painfully uping and downing at G1 speeds makes it a dream.
http://www.solaire-chauffe-eau.info/cn ... pecker.MTS