I try to avoid writing macros, because writing a macro always means spending an hour or more tearing my hair out trying to figure out which OEM codes I need, and then figuring out why they don't work as it seems they should. For example, in writing my recent tool length setting macro, I needed to know whether G91 or G90 are in effect. Of course, there are LEDs for both (OEM LEDs 48 and 49). But, only one of them actually works! The other is ALWAYS zero!
Right now, I'm looking into writing a custom macro for loading the tool length offset table, using my touch plate. Looking at the existing button macro, the first line reads:
Tool_Num = GetDRO (24)
Clearly, DRO 24 *must* be the DRO on the various screens that shows the currently selected tool. But, referring to the (many) OEM code spreadsheets, they all tell me DRO 24 is the "PWM Base DRO".
It is incredible to me that there isn't a complete, correct, *official* list of OEM codes, and their meanings. I've had so many occassions where the codes are clearly NOT what the documentation would suggest, or don't work, or are simply so vaguely defined, that it's impossible to even guess what the function is. Add to that the fact that there are a bunch of functions that the Mach3 customization guides indicates are deprecated, and so should not be used, yet they *are* still used in the production code. And, in some cases, it does not even appear to me there is any other way of doing what they do. It all makes writing macros a real exercise in frustration.
Regards,
Ray L.