I am progressing with my OX build and I am to the point that

I am progressing with my OX build and I am to the point that I am starting the test with an active spindle.

Warning: I am new to CNC routers and the unique Gcodes that are associated with them like drilling. I had not idea there were so many fabrication setting involved :(.

I am preparing to route a K40 sub-panel as the next test of my OX.

My tool chain is:

  1. Design in sketchup
  2. Exported as DXF (polylines)
  3. Imported into CamBam where the CAM operations are added
  4. CamBam created Gcode
  5. CamBam generated Gcode imported into CP
  6. Simulate in CP
  7. Route on live OX from CP

Steps 1-4: seemed to be working correctly in simulation.
Step 5: loaded the correct Gcode into CP
Step 6: the simulation runs ok in CP except for the drill operations. It seems to move to the first drill location, run all the drill Gcode and then proceeded to execute the rest correctly. FYI: The drill operations are at the start of the Gcode.

I checked the Gcode using my 3D CNC viewer and the simulation runs flawlessly including drilling operations.
I checked and the correct Gcode is loaded in CP including the drill methods.

Keep in mind I have not run step 7 yet…

Would appreciate any hints as to what could be wrong:
A. CP does not simulate drilling operations?
B. CP has a bug?
C. I have something wrong with drilling settings that shows up in CP?
D. I have a Gcode that CP does not support?
E. CP will simulate correctly when I go to tool chain step 7?
F: Other …

Pictures attached…

Hey Don, G98 is in the first of your drill code correct?

@Brandon_Satterfield here is the code for the hole drilling:
8 N8 ( Drill Holes )
9 N9 G17
10 N10 M3 S1000
11 N11 G0 X2.25 Y4.172
12 N12 G98
13 N13 G83 X2.25 Y4.172 Z-0.22 Q0.22 R0.25 F10.0
14 N14 G83 Y0.25 Z-0.22
15 N15 G83 X5.5694 Y1.3012 Z-0.22
16 N16 G83 X7.4646 Z-0.22
17 N17 G83 X7.292 Y0.25 Z-0.22
18 N18 G83 Y4.172 Z-0.22
19 N19 G80

G2/G3 arcs still don’t simulate well in CP. They will run fine on your controller though. Drills are usually G2/G3 arcs out of CamBam, so just ignore.

@donkjr your line 12 is what is choking everything.
Delete that line. It most likely will run just fine. GRBL doesn’t support it either.
Seems a work around was made by someone at one time using possibly G83 or G89…
I do drill/can cycles all the time. I leave it in my post processor as the one machine that uses it would screw me if I left it out. G98 throws a warning and stops the rest of them.

Drop that line and run the job in air.

I don’t recall grbl supporting g83 etc either btw.

@jlauer ok, but what CP is not simulating is the Drill methods the only place G3 are used is in the cutouts that simulate fine…?

The simulator doesn’t rewrite the gcode. So if it is valid it will still work in your controller (if supported) notwithstanding the simulation not being accurate.

… thanks for putting up with my Gcode learning curve!

The material I am using is .22 acrylic and I chose to peck the drill process as that is how I drill acrylic manually to keep it from cracking/crazing.

… as I understand it correctly the G98 retracts the Z axis back to the initial Z position vs the R position that is set in the G83 code. Otherwise it will retract to the R position set in the G83 code. I assume this allows you to retract to one position when pecking and then retract to a second (higher) position to move.

… in my code the initial Z position and R are the same = .25
… the increment of each peck (canned cycle)= Q
… in my code Q= .22 i.e. the thickness of the material

…so I am not really pecking and the G98 is really not doing anything.
I think that the Q value is the same as the material thickness because I set the peck distance = to the material thickness, not knowing what I was really setting up!

I guess I need to go find out why CamBam is adding the G98.

…in any case I will try with and without

Another ?: what do you mean by = “I leave it in my post processor …”

@donkjr I enjoy this stuff sir and you contribute greatly all our knowledge. Glad I could give back :-).
Post processors. This sir will be a another post… haha.
The short- CAMBAM as well all others I’m aware of (CAM) has predefined post processors for different tools, mills, lathes, plasma cutters, etc. it adds all the little extra stuff to a Gcode for a machine you are using. M7, M8, M6 G43, etc.

When you are ready, set up post processors for all your machines and then when you want to move to another machine you just in CAMBAM and select your tool and go to town.

I like to learn so I use a stock one which forces me to learn the likes and dislikes of all controllers.

Oh, and above you are absolutely correct, although I believe you will still peck. I know it does in GRBL. Unfortunately as you note above it is not the most efficient. If you could just clear a little height the bit would cool off chip would move and you could re-enter. Not so important at less then a 1/2".

@Brandon_Satterfield heh… I like this stuff to its the only reason I keep poking at it. As I get through this learning curve I will document what I learned so other novices will have less to discover.

… I had no idea that there were so many code “tweaks”. This must drive CNC machinists nuts!

I keep telling myself this will all pay off in the end when I get better at it …
… I could have made this panel by hand on my mill in 1/2 the time I have already invested in the CAM design, which I am not yet happy with.
… and I haven’t even started to make chips yet … sigh!

So it sounds like I will have to do a CAM design and then go back and check to remove things like G98 that are not compatible with my machine? I have tried different settings in CamBam and it adds the G98 no matter what.

BTW: I was disappointed to find out this AM to simulate in CamBam I need to buy another piece of software @ >$200. I would have thought that it was included in what I paid for the CamBam license.

There are free simulators. Me personally I never simulate anything.
It may sound a bit daunting at first but you will get it down pat. And if you go through the act of setting up your post processors per machine you will have one software that you can go in, pick the profile, drop the DXf, set tool paths and go.

OK, After building a simple Gcode program for drilling a single hole and watching CP skip over the G83, I simply sent this to the TinyG

G83 X0.0 Y0.0625 Z-0.22 Q0.11 R0.22 F10.0

It did nothing … no error just winked at me…

Then expecting that TinyG did not support G83 I found this:

@Brandon_Satterfield above you said you use canned cycles all the time. Are you running a TinyG, I guess not?

Does this mean if I want to peck I have to write my own version of G83 that uses compatible Gcodes incrementally?

I know this is resurrecting a really old post, but two things for the next person who finds this while searching for new information…

I discovered yesterday that FreeCAD’s grbl post processor finally adapted to lack of canned drill cycles in grbl and quit emitting them. Previously they had depended on the sender to interpret the drill cycles and convert them into G0 and G1, which at least bCNC did; I don’t know about other senders.

I learned about this because grbl_esp32 prints from sd, so there’s no sender to do post-post-processing. :slight_smile:

Free, open source simulation is available: CAMotics