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