Macro programming is hard enough, but I always found remembering what #107 actually did in my subprogram was torture. I'd keep a cheat sheet handy, but it was still painful.
Some controls fix this. LinuxCNC lets you say, "#<holedia>" instead of #107, for example. Fanuc has a syntax called "SETVN" on some controls, but not all. Okuma and others have symbolic names.
I just added a feature to G-Wizard Editor that lets you work with symbolic names whether your control supports them or not. It's described in a blog post here:
G-Wizard Editor v0.680 is out: Try the new SETVN support even for controls without SETVN « CNCCookbook CNC Blog CNCCookbook CNC Blog
Basically, it saves Fanuc-compatible "SETVN" statements in a comment. Now here is the nifty part:
You don't have to even have a Fanuc control to use it. You could be on Mach3, for example. What it does is when you load the file, you can execute a command that will read all those comments, search and replace all the #107's to be #HOLEDIA, and the GWE simulator will understand and execute those properly.
Then, when you're done editing and simulating, run the command again, and it converts them back to numbers. But, the definitions for those numbers are saved in comments that will be there the next time you want to use and understand the program.
Check it out. Our Beta testers really like the feature. Registration for the Beta test is free:
GWizard Editor: A G-Code Editor and Simulator
Cheers,
BW
Cheers,
BW