Hi,
you need to get into the habit of calling macros by their lowercase names, m220() not M220().
It will throw up errors from time to time which can be very hard to understand.
In Mach3 all M codes above M100 were considered user codes whereas any below that number were
reserved for Mach. I suspect m22() would work (in Mach4) but my preference is name it in such a manner that
there is no ambiguity.
Because you told me in the other thread on here that the code is sometimes different I will stop trying to use that for testing and just type in the MDI to test the M220 macro.
It not so much that the code is different but rather it is in two different locations. As Mach runs it is going from the GUI
chunk to the GCode interpreter chunk and back again all the time. What I have suggested is that if you want some particular
machine behavior that is the same in both chunks then code it in two places. With such simple code this is easy. If
the code were complex it would be best placed in a module. The module could then be accessed by either the GUI OR
the GCode interpreter but the code would not have to be repeated in both chunks.
Craig