Hi,
I think the pound variables in the range #500 to #549 are persistent global variables. That is to say that they are written to the .ini file and so are preserved
over different Mach sessions.
Good spotting with the L vs Q. I didn't spot it myself.
CNC Programming Handbook
by Peter Smid is pretty much the bible for CNC. It is almost too comprehensive to be a quick reference but it is good.
There is one way in which Mach4 Gcode is somewhat stricter than Mach3 Gcode:
N00170 G04 P3.000000
N00180 G82 X-31.9000 Y27.1800 Z-3.0000 F100 R1.0000 P0.500000
N00190 G82 X-37.3000 Y13.6000
N00200 G82 X-37.3000 Y18.7000
N00210 G82 X-37.3000 Y21.3000
N00220 G82 X-16.8500 Y27.4000
N00230 G82 X-21.6000 Y22.7500
N00240 G82 X-23.7000 Y9.4500
N00250 G82 X-27.4500 Y34.4000
This is a fragment of code for drilling holes in circuit board. The code was produced by a PCB-to-GCode utility operating on PCB software EAGLE. It works in Mach3 as is
but not in Mach4. The reason is that the drill cycle G82 is modal, you mention it once and it stays active until you change it. Therefore having G82 on each line is redundant and
worse illegal because successive lines only have the new X and Y co-ords without all the other drill cycle parameters. The code runs in Mach4 if its edited:
N00170 G04 P3.000000
N00180 G82 X-31.9000 Y27.1800 Z-3.0000 F100 R1.0000 P0.500000
N00190 X-37.3000 Y13.6000
N00200 X-37.3000 Y18.7000
N00210 X-37.3000 Y21.3000
N00220 X-16.8500 Y27.4000
N00230 X-21.6000 Y22.7500
N00240 X-23.7000 Y9.4500
N00250 X-27.4500 Y34.4000
Each successive line introduces new X and Y cords and the existing drill cycle parameters are assumed constant.....as you can see the Mach4 interpretation is actually the correct one
its just that we became accustomed to dodgy code in Mach3.
Craig