Originally Posted by
Richster
Okay I got this working, thought I'd document in case anyone else is looking to do similar. So my scenario is 3 input pins (start / hold/ stop). So that's three inputs, there only need to be two outputs for button illumination since 'stop' will always be the inverse of 'start' (can be done with electronics rather than using up a pin....
For the inputs, these are used on 'OEM Trig #' inputs, which are then mapped to the OEM commands under config->system hotkeys. The codes are 1000, 1001 and 1003 for start, feedhold, stop.
The LED OEM code for 'start' is 804, and it's 805 for 'hold'
Assuming that the two 'illuminate' signals are interfaced to outputs 3 and 4, then the code in macropump.m1s is as follows. Also 'macropump' needs to be enabled in 'general config'. The file goes in the 'macros' folder for the currently active profile, e.g. c:\mach 3\mill\marcos
'----Start button
If GetOEMLED(804) Then
ActivateSignal(OUTPUT3)
Else
DeactivateSigal(OUTPUT3)
End If
'----Feed hold button
If GetOEMLED(805) Then
ActivateSignal(OUTPUT4)
Else
DeactivateSigal(OUTPUT4)
End If
Hope that helps!