Just a word of warning :-
#2001 onward are used by Mach3 as data locations for tool offsets, you may get strange results if you use them. #100 to #149 and #500 to #531 are user variables #1000 and over are system read only use. That said you can write to them to set system values.
Graham
In my g-code part cutting files, I typically use about 100 user variables. Even my simplest files have over 40 user variables From what you say, mach3 shouldn't use files written like this.
I make parts for musical instruments and there are many variations of each part to accommodate different tunings and other preferences. I have generic code files for each part and then change the values of certain user variables to suit the specific part being made. The code files contain various calculations, the results of which are stored as numbered parameters (user variables) for use in cutting the part .
This is the only way I could find so that I can make a small number of generic files that could easily be adapted to suit specific dimensions.
An alternative would be to write a (very long) file for every variation of each part.
Is there another way to do this?
The feed rates, of course, could be written directly into the appropriate blocks.
What I would be looking to do is reduce the number of variables that I am presently using to just the essential ones with part/stock dimensions. Then, perhaps use these variables externally (macro?) to make all the calculations and use the results of these calculations to cut the parts.
All my parts are made from tubes, but the cuts I make in them are not standard holes. I have to machine the sides of any hole cut through the tubes, with various profiles. Cuts that are across the width of the tube can be made with either "a" axis "y" axis or combination of both.
You might wonder why I write all of this code by hand. It's because I can't find an economically priced software program that can do it. Most commercially available software seems to assume that you are cutting solid blocks, sheets or if it's a pipe you are doing conventional pipe fitting.
My CNC mill is a custom K2CNC with a 4th "a" axis concentric to the "x" axis.
Any suggestions would be very welcome.