What cam program do you use? It may do it automatically if you give it a tool size.
Otherwise, the following may help:
I run G40 at the end of every program to clear offsetting. Does there need to be anything other than a line number, space, and then "G40" on the line?
Technically you don't need line numbers in your code at all. A G40 all by itself is fine, with or without a line number which is always optional.
How early in the program can G41 or G42 be placed (obviously before any cutter moves) and does there
need to be anything else on the line besides the line #, space and "G41 or G42"?
Basically it's up to when you want to call a G41 or G42. Normally you would put it after any initialization lines, such as setting the units, turning on the spindle, cancelling rotations, or whatever you need to setup the system before the run. There is no hard and fast rule, that I know of.
Along with G41 or G42 you normally add a D[tool#] and if you don't specify it should (haven't tried it) use the active tool in Mach's tool table. E.g. if you called a M6 T2 then after that point Mach would use the tool size specified in slot 2 of it's tool table if you don't specify a D parameter. You can also use P parameter to over-ride mach's tooltable and specify your own tool diameter.
The gear is cut clockwise, so I would want to keep the tool to the left of the workpiece (correct?)
Correct.
The gear is cut clockwise, so I would want to keep the tool to the left of the workpiece (correct?)
Does the tool length need an entry to make the offset work?
No.
I use a 25.4 multiplier for x,y and z on the "run" screen since that was the only way I found that let me work in inches with the cad software I am using.
I wouldn't recommend using scaling on a regular basis. Your cam program can and should do it. Simple is always better, in my experience. The more features you use the higher the chance of weird things happening! On the other hand it "should" be able to handle it, but I can't say I've used scaling with tool comp.
I've tried all combinations I can think of so there has to be something I don't know about.
I have tried it with no "G"'s at all, same effect (as expected).
Using any combination of the 3G's and diameter or radius seems to make no difference at all.
Try selecting a tool table number with D parameter when using G41/42. Make sure you first put some data into the tooltable. If you change tool numbers after putting values on the main screen it may be switching you from Tool 0 to whatever you specified on the toolchange (e.g. M6 T2) which is probably blank. Also try over-riding it with a diameter specified with a P parameter.