Well I may or may not need help! I found a way of doing it, but it seems very convoluted!
I wanted to attach a physical (real world) button for the auto tool zero function, to be used in conjunction with a touch plate. Incidentally, this button will also illuminate along with the 'on screen' tool change LED.
The LED / output I have working via the macro pump function, checking the status of the on screen LED and turning an output pin on/off accordingly
Re the button, I was looking on the list of OEM codes here:
https://www.cnczone.com/forums/attac...6/61017.attach
but I don't think it's listed.
The only way I could make it work is as follows:
I made a M35 macro, which is also part of the initilisation string in Mach3 config
M35.m1s reads
SetTriggerMacro 36
A second file (M36.m1s) has the normal zeroing logic for the touch plate
To call the macro from an external button I am using OEM code 301, and linking that using a 'hot key' to an OEM Trigger.
So the flow of events looks like this....
Input pin X is linked to OEM trigger Y
OEM trigger Y has OEM code 301 attached to it
OEM code 301 is linked to macro M36
M36 was linked at startup by another Macro, M35
M35 was defined in my Mach 3 startup string.
So that's it! It works, but seems overly complex. Am I missing a trick?
Also, this means there could only be one custom OEM trigger (301) defined. So I've now used that up!