Author Topic: G83Extended High Speed Asymmetrical Parametric File Converter  (Read 2710 times)

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
G83Extended High Speed Asymmetrical Parametric File Converter
« on: December 23, 2019, 07:39:07 am »
Here is a Plugin That extends the capabilities of the standard G83 Deep Pecking Cycle

It was tested with CamBam ver1.0 rc2.
G83 Extended Pecking Cycles in the plugin menu.

It was Inspired by this video From Hass:https://www.youtube.com/watch?v=AM6nVgKjBQo

If you watch the video, the variables will make sense as it's based on that video.
It was tested with Mach3 and Mach3+cutviewer,Linuxcnc, and the Default PP.
And is for any controller that will accept a G83 code. Not grbl though for obvious
reasons.

The output file is Identical to the input file with only the G83's changed.

The zip file has a Folder that contains the “G83 Default TestFile 1.cb” plugin.dll and the Default setup file.

Unzip the folder to your usual cnc files folder.

Open up the folder and load the cb file then Immediately Save it (this sets the file associations).
I'm using the Default PP and the standard mm libs for the sake of compatibility but you can use
one of the of the above  tested  PP's .

The file has threes mops with the same target depth and different Drill Diameters.
3mm,6mm,and 9mm Drill Diameters and a Target Depth of -30.

Why? because the math works out nicely to show the proportional Asymmetrical thing
so 'for the love of mike' DO NOT CHANGE ANYTHING IN THE FILE'.
Leave it Metric and if you click on the mops and CB asks you to change anything click no.
I've already hard coded the Drill Diameters into those mops in the file.

So now you have loaded up the CB file and saved it:
Now Generate the code ctrl+w or from the drop down menu.

You now have this file:“G83 Default TestFile 1.nc”

Your screen should look like pic1. If you have programmers notepad.
if you are using the windows notepad then your Gcode formatting will be a little different (not as neat).

Now it's time to run the plugin (If you have it already open then you MUST close it and reopen it).
Your screen should look like pic2.

An Important thing to note is that if you adjust the mops in CB then you must re-generate the
Gcode file, as the plugin works with that.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #1 on: December 23, 2019, 07:41:42 am »
OK, so to make our first modifications to the G83's output in the Gcode file, we load up the .nc file into the plugin Pic 3.

The plugin should look like this, both the Load .nc file button and the convert button will turn green.
Pic4


An Important thing to note is that if there are Three G83's in the file, then you have to set the variables for each of mops the first time a new file is loaded up, as you start the Iterative process of designing your Pecking Cycle .
For purposes of this example select each of the mop in the drop down box and press the set individual mop settings button.
Pic 5

OK so now we can convert the file (the convert button) has turned green.
Pic 6
Now load up the 'G83 Default TestFile 1 G83Extended.nc'  file that has now been produced with
preferably with Programmers Notepad .

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #2 on: December 23, 2019, 07:45:18 am »
Why? Because it knows when the file has been altered by the plugin so when you click on the 
Programmers Notepad to have a look at your new file It will ask you to reload the file.
Windows Notepad won't do this so you have to remember to do this. This can cause the error
of converting a file but nothing seemingly happens, it has of course your just looking at 'Yesterdays News'.

The G83's in the file that you have produced should look Identical to the ones on the posted
called 'G83 Default TestFile 1 G83Extended compare this file to the one you just made.nc'
If all is well you are good to go.

For Designing you also want to click the Output Comments Check Box.


1. The Stock size 25 mm x 25 mm mild steel bar stock.
2. The Target Depth of the hole will be Z-30 mm as this is a through hole and we
want the cutting edges of the drill to pass below the bottom of the stock.
3. This a Ten times the Drill Diameter Deep Hole. X10

There are seemingly a lot of variables to fiddle with, this provides get flexibility in
designing the G83 but can be confusing to start out, so well start out with a simple clearance
move to be performed at Z-18 mm (6 Drill Diameters).

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #3 on: December 23, 2019, 07:48:22 am »
Then to make the change active for the mop click on the Set Individual Settings Button
(It'll turn Green)  then click the convert button, Now open the file with Programmers Notepad.
When you examine the Gcode, You'll see that  a Chip Clearance Move has been created at Z-18.
in Pic 7

Too move the Clearance move Up or Down in the Hole  all you do is change the variable,
so say we want to lower the  Chip Clearance Move from now Z-18 to Z-24 then we would with a 3 mm tool
add 2 Drill Diameters to the variable now(6) and make it (8) 8 x 3 = 24. you can
work this out with the number being in  Drawing Units by pressing the 'calc' button.
So for this example file this is mm (24mm).

Remember that if you make a change to any of the settings you have to press the
Set Settings button for that mop again and then press convert.
The clearance move has now moved from  Z-18 to Z-24
Pic 8

Now you are ready for the 'Rinse and Repeat' part, move the  Clearance move Up or Down
by adjusting the Chip Clearance Move  text box value then click the set settings button and
then convert button and examine your file by clicking on  Programmers Notepad in the task
bar and it will ask if you if you want to reload the file click yes.

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #4 on: December 23, 2019, 07:49:57 am »

When I get a bit more time I'll do the 'Stay inside Hole' and Return to Clearance Plane check boxes.
 It's fairly simple, you just have to know that in practice  you want to keep this variables minimum
value to  at least 'Half a drill diameter' to ensure the cutting edges stay completely under the stock surface.

To Illustrate one  of the powers of parametric programming of the pecking cycle look at 9 metric  and 10 which is in inches with measurements close enough to the 3mm Z-30 hole X10 .
I used a one eighth drill in a inch and a quarter hole.
Pic 9
pic 10

Notice that I have not made any to changes the variables in the plugin to get a functionally equivalent pecking cycle across the two measurement systems because they are both X10 holes.
Merry Xmas
Dave

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 3026
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #5 on: December 23, 2019, 14:03:09 pm »
Although I haven tried this plugin yet, I appreciate your effort. Thank you, and Have Merry Christmas.
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #6 on: April 04, 2020, 09:33:37 am »
I've made a few adjustments to the plugin, adding a extra decimal place
for Imperial users, and added an extra feature allowing rapiding to the stock surface
of each individual mop.

In the first file is a default G83 generated by CB. ,nc files in zip
For those who can read Gcode the problem becomes obvious.
For those that cannot, them problem lies here.

Running through the code top to bottom.
There is a move to the clearance plane  3 mm above the stock.
a previous pocketing operation has removed 4 mm of material. so the actual stock surface
is now -4 mm.
The target depth is -10 from the top of the stock making the hole 6 mm deep.
the drill will move to the clearance plane (3mm above the stock) and commence the drilling cycle.
it's going to move at the plunge feedrate to the stock surface -4 mm (that's 7 mm) @ 4mm\m
this takes roughly 2 minutes per hole of cutting air. nearly 8 minutes all up for the four holes.
and as you can see in the second pic,I have a small mountain of these things to do.
128 holes all up that's 256 minutes of air time.

This is obviously no good, so I've reprogrammed the plugin to rapid to the stocksurface of
the pocket. it did this before if the stocksurface was Zero but took it's info from the generated
gcode which does not take this into account, it now looks at the mop for this info.

The third file, shows the plugin generated code.
as can be seen the machine will move to the hole position at the clearance plane and
then rapid to just above the pocketed surface, and commence drilling saving 4.2 hours
on this real job.

In the fourth pic is a semi regular job, each piece has 100 holes. these are gauge parts
and accuracy is the most important parameter closely followed by production time.
50 x 2.97 mm and then reamed to 3mm.
50 x 2.5 mm holes for m3 threads and then tapped. I'm going to make removable full rigid
tapping device that fits to the spindle drive. I've made a start on a full rigid tapping Plugin for CB.
as the holes for the threads are 27 mm deep they are first drilled with a clearance dill
to 15 mm deep and then drilled with a 2.5 mm drill for a further 12 mm to -27 mm.
that means 15 mm of air time at the plunge feedrate per hole the old way.
that's 15 mm by 50 holes by 12 individual blocks 600 holes. so that's why I spent the extra
time to add this feature.
As you can see by the sim times, you could grow a 5 o'clock shadow by the time the regular
G83 canned cycle finishes.

As usual I've zipped up the files so that you can duplicate the results.
I've one more quite complex drilling job 200 holes 1 mop per hole (because the work piece is tilted in the Z plane) meaning the clearance plane and stock surface are different for each hole that perhaps I can  simplify,  and will do some testing with that in the next few days and if all is well I'll post the new .dll through the week.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #7 on: April 04, 2020, 09:35:24 am »
more files

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #8 on: April 04, 2020, 12:24:06 pm »
1 more picture of the finished gauge part

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #9 on: April 16, 2020, 01:57:03 am »
Here is an Update to the G83 Canned cycle maker --> G83 to any of the other Drilling cycles
plus a few extras.

1...Added an Extra decimal point for textboxs.
2..Crash Detection for some simple Errors.
3..Ability to copy settings to multiple mops. (if they have the same Actual hole depth)
they can have different target depths and stock surfaces.
4..The interface shows some more information about the mop you are working with.
5..Selectively work with only enabled mops in the CB file tree.

One other thing, even the new versions of  Camotics (1.20) don't implement G83's yet, and I suspect
not any time in the near future as it's hard.
These plugin generated toolpaths will simulate properly though. so that's a bonus for CB'ers
using Camotics.

A trap for young players is when using Camotics from within CB, is that it overwrites the generated file
before loading up Camotics, therefore you'll lose your changes to the file.
So to use Camotics you must run it from the icon on your desktop and then make a new project
and open the G83Extended file, or if you are overwriting the original file with the plugin, that filename.

This version is tested on  CB Ver 1.0 32 bit OS's as I cannot at the moment test the X64 version.
It is compiled for Any Processor so should work with X64.
The first screenshot is of the provided CB file from the zipfile.
Ideally you should download the zip file and make a new folder in your cnc directory and
unzip to that.
It contains three files to work with and three copies.
1...A CB file
2...The Vanilla CB .NC file ------------> with standard G83's
3...A file generated by the plugin.--> with  the custom Canned Cycles.

And a copy of each of the files to be used as a reference in case things go pear shaped.
And the plugin .dll
The first pic (pic1) is of the just opened CB file, there are Two pocket mops, they are disabled in the pic
only for clarity, and must be enabled and generated for the simulator to show the cut-away surfaces
exposing the drilling mop holes

Continued next post:

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #10 on: April 16, 2020, 01:59:59 am »
OK so to work with the file, enable the pocket mops and generate the .NC file CTRL+W
Load the plugin and open the just generated .NC file (pic2)
Click the "Reload Mops Button"
Click on the list box to see the mops with which you can work. (pic3)
All three of the Drilling mops will show up.
If you only want to work with one or some of the mops, then disable the mops in the CB file tree
and Click the "Reload Mops Button" again. (pic4)

One very important thing to remember is, that you are working with the generated  .NC file.
so this means that if you modify the mops in the CB file, then you have to regenerate the NC file
and reload it into the plugin. You can however enable and disable the mops to select which ones you
want to work with without regenerating the file.

The next thing to do is, select the first mop in the listbox (Drill Stock Surface = 0)  and enter
the values (in the pic) into the settings textboxes and then click the Calc button, if all is well
you should be looking at (pic5).

You can now set these values for the mop by clicking on the "Set Individual Settings For This MOP" button.
You can now select the other two mops and set the settings for those as well.
The last thing to do is Generate the file,click on the Convert to Parametric Asymmetrical Tool Paths" button
and your done.







Continued next post:

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #11 on: April 16, 2020, 02:03:27 am »
You can now load up Camotics from the Desktop and make a new project and add the test 3 holes at different stock surface heights G83Extended.nc file to it and simulate it. (pic6)

Before I use the simulator though I always load up the newly generated file with programmers notepad
and have the comments turned on so that I can check the settings.
You want to use PN as most of the other text editors won't warn you if the file has changed since
the last time you opened them and you will be looking at the old file.
There is one last trick the plugin can do, and that is drill holes on an inclined plane (think wedge shaped work piece)  where the Stock surface,target depth, retract  and clearance plane parameters
continually change per hole. And as time permits I'll post a small tut on how to do this as soon as I
finish the OnMassMopEditor which is required, as it can do simple incremental math on the mop parameters.


Dave
« Last Edit: April 16, 2020, 02:12:56 am by dave benson »

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4565
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #12 on: April 16, 2020, 16:04:25 pm »
Dave,

It works okay with CamBam 64bit.

Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #13 on: April 16, 2020, 23:54:15 pm »
Thanks Eddy.

I'll keep using those settings then.
I've added incremental math to all of the standard CB mops, But the Vengrave and the Troc Mops
are proving resistant to the incremental math, for example I can set the values, but cannot read  some
them.
Anyway I've got a bit of time today, and will try a few more things, I know the values are cached and
before bed last night I looked at the readxml function, but the penny still hasn't dropped as to how the
mechanism works with loading and saving the Xpropertystylesheets work.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1356
    • View Profile
Re: G83Extended High Speed Asymmetrical Parametric File Converter
« Reply #14 on: June 03, 2020, 09:55:56 am »
I've added a new panel for rigid tapping catering for hand,spiral point and spiral flute machine taps.
If you have a series of holes to drill and tap, then make and save the gcode then open the plugin
make your canned cycle as usual then check the "Thread this Mop" checkbox
and set the parameters to suit.

If you want to use a hand tap rather than a machine tap, then check the "Break Chip"
checkbox, leave the "Cutting degrees" textbox to 180 degrees for mild steel, note that
if the material is harder to cut, back this value off, if it's easier to cut like plastic then
you may up this value to 360 Degrees or more.

The Backoff amount is the amount in degrees to reverse the tap out of the hole to break the chip.
The threading feedrate is ok for M3 and M4 tapping of mild steel as can be seen in the photo.
The threads look really nice.

To test the Gcode generated by the plugin I scrounged around and found a 100 watt servo motor
and connected it to directly the spindle but it was only capable of turning the spindle after it was powered up and
warmed up for 5 minutes or so.

I do have a variety of worm drive gearboxes although mostly bigger units, I found a Boston Gear one and
machined up some brackets, and it worked fine for M3 and M4 threads but M5 was no go.
So a larger gear reduction is needed currently 5:1, the threading went so well I've stumped up for a new
nema 23 size gearbox 16:1 30NM dual reduction gearbox with the correct motor shaft to gearbox mounting.
This will made the unit very compact and light, as I want to leave it connected to the machine and
just lift it up and away from spindle spider coupling  when not using it and to be able connect it fast
when wanting to use it.

I did modify the worm drive, by machining a new front mount where the bearing is offset, to close up the
tooth engagement there was perhaps 1 or two degrees backlash and about half that now.

During the tests  I could hear the backlash especially at higher speeds and the backlash adjustment
in Mach3 can only do so much to help this, so I've (for using hand taps) made a small trajectory planner
doing a point to point Acceleration\Velocity overlay on the output Gcode.
What does this mean in English?
It is very kind to the Gearbox but more importantly the tap.
As soon as the Gearbox Arrives and I've finished testing I'll post the tapping .dll

Dave