Can We Talk CAM Programs?

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

Toymaker

Well-Known Member
HMEM Supporting Member
Joined
Jan 26, 2022
Messages
211
Reaction score
88
Location
Thailand
Thanks for this. Looking back, it seems I've manually written G-code quite a lot. Doing subroutines and those more "advanced" concepts you have would help me out. When I made my Webster, I hand wrote the code to cut the rod to its final depth between the two bosses. The two rods are rather different, but also have a lot in common. I was thinking about doing the same for this one but there's a couple of differences to complicate things. Still, it might be useful to do it.

View attachment 135964

The 1 by 1 conn rod at the top and Webster. Brian's is more "conventional" looking, at the price of that raised area on the right not actually being circular. It's spread out to allow the slitting saw to cut off the cap on the end, so two semicircles with a .050 flat area between them that the saw cuts away. With the Webster, I moved the cutter to a tool radius on the right side of the left boss on the mid line, cut a circle, then moved the cutter to one radius on the left side of the boss. Doing so cut the entire area to the final depth. Like this:

View attachment 135965

To do this on the 1 by 1 rod, I'll need to cut two semicircles offset from each other.

I need to refresh myself on how to cut semicircles. I think I've done it once.

If you look at the example code I posted, it has many semicircles (aka: arcs) which are all milled using G2 and G3 commands. Both G2 & G3 work by using the current milling location as the start point of the arc and the X-Y coordinates designated in the G2 or G3 command as the end point of the arc. Don't forget to include the radius of the arc, and to compensate for the radius of your end mill, same as you do when determining milling coordinates for a straight line. One little quirky "feature" about Mach3 is that G2 & G3 commands don't work well if your arc exceeds 180 degrees, so those large rounded ends of your connecting rods will need to be described as two consecutive arcs, each with less than 180 degrees of travel.

Once your code is written and loaded into Mach3 you can test it first by clicking on the "Tool Path (Alt-4)" button, which opens the tool path screen. Clicking on the green "Cycle Start" button will cause Mach3 to trace the tool path shown on the screen, and if the power to the CNC motors is disabled, there's no chance of breaking tool bits due to coding mistakes. By clicking on the "Single BLK" button first you can step through your G-code line-by-line by repeatedly pressing "Cycle Start", as you watch the tool path being traced out on the screen one line of code at a time. I use this Mach3 feature to de-bug my code before I actually run it on the CNC machine.

Hope this helps :)
 

CFLBob

Well-Known Member
HMEM Supporting Member
Joined
Feb 10, 2018
Messages
960
Reaction score
290
Location
Central Florida
Once your code is written and loaded into Mach3 you can test it first by clicking on the "Tool Path (Alt-4)" button, which opens the tool path screen. Clicking on the green "Cycle Start" button will cause Mach3 to trace the tool path shown on the screen, and if the power to the CNC motors is disabled, there's no chance of breaking tool bits due to coding mistakes. By clicking on the "Single BLK" button first you can step through your G-code line-by-line by repeatedly pressing "Cycle Start", as you watch the tool path being traced out on the screen one line of code at a time. I use this Mach3 feature to de-bug my code before I actually run it on the CNC machine.

Between my G-code simulator (GWizard Editor from CNCCookbook), the simulator in Mach3 and cutting in the air above the part, I've been fairly good about finding the mistakes before actually cutting metal.

I had to be out of the house and shop all day yesterday, but I had converged on what you're saying, @Toymaker. I'll direct it to one endpoint of a semicircle, have it cut the 180 degrees with the right I and J, do a straight line to end of the other semicircle and then cut that.
 

Toymaker

Well-Known Member
HMEM Supporting Member
Joined
Jan 26, 2022
Messages
211
Reaction score
88
Location
Thailand
Between my G-code simulator (GWizard Editor from CNCCookbook), the simulator in Mach3 and cutting in the air above the part, I've been fairly good about finding the mistakes before actually cutting metal.

I had to be out of the house and shop all day yesterday, but I had converged on what you're saying, @Toymaker. I'll direct it to one endpoint of a semicircle, have it cut the 180 degrees with the right I and J, do a straight line to end of the other semicircle and then cut that.

Sounds like a good plan. You could even place the tool path code in a subroutine which drops Z incrementally each time the sub is called. :)

Keep us posted on your progress.
 

Toymaker

Well-Known Member
HMEM Supporting Member
Joined
Jan 26, 2022
Messages
211
Reaction score
88
Location
Thailand
Toymaker, Your post #57 shows a .039 diameter tool in the comment as .0197 radius. Should that be .0195? Just learning :)
George

From a pure math standpoint, of course you're right. I should have noted in my comment that the 0.039 is the rounded inch equivalent of the 1mm end mill I'm using. The metric-to-inch conversion app I use tells me that 0.5mm = 0.01968498, or 0.0197 rounded to 4 places. So that's why I use 0.0197 instead of 0.0195.
 
Top