From Ref Manual:
Sub SetTriggerMacro(MacroNum As Integer)
This function allows an M-macro to be associated with OEM code 301. This can be used
to cause one of the OEM Trigger signals to automatically run a macro when asserted. To
do this, the OEM Trigger signal must first be configured in Config->Ports&Pins-
>InputSignals. Then the OEM Trigger must be associated with OEM code 301 in
Config->SystemHotKeys. Finally, SetTriggerMacro must be used to define which Mmacro
will be executed when OEM button code 301 is executed.
Arguments:
MacroNum is the number of the M-macro to be run when OEM button code 301
is executed.
Return Value:
None
Example:
‘ Assume OEMTRIGGER5 is assigned to OEM code 301
‘ Assign the M1025 macro to OEM Code 301
SetTriggerMacro(1025)
‘ Now, when OEMTRIGGER5 is driven to its active level,
M1025.m1s will be executed
Simple, ennit?
Cheers
Roger