Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: LZD110 on November 13, 2018, 08:54:39 AM

Title: How to use OEM301
Post by: LZD110 on November 13, 2018, 08:54:39 AM
How to use OEM301

Which macro file is OEM301?
Title: Re: How to use OEM301
Post by: RICH on November 13, 2018, 09:10:50 AM
You will find some info on OEM code 301 in the Mach3 Macro Programmers Reference manual.
I have never used it.

RICH
Title: Re: How to use OEM301
Post by: rcaffin on November 15, 2018, 04:08:32 AM
I suspect the only person who has ever used OEM301 was Art Fenerty, and also that he used it just once for some special task.
My 2c.
Cheers
Roger
Title: Re: How to use OEM301
Post by: ger21 on November 15, 2018, 06:32:12 AM
Looks like the Wiki is now gone, so can't look it up.

Is OEM301 used for OEM triggers, like I think?

If so, it's not terribly useful, as it only works with one input.
Title: Re: How to use OEM301
Post by: Tweakie.CNC on November 15, 2018, 07:52:21 AM
Quote
Looks like the Wiki is now gone, so can't look it up.

Sorry guys, a bit off-topic but it is devastating that the Wiki has gone  :'(   so much information from the past just wiped out ???

Tweakie.
Title: Re: How to use OEM301
Post by: rcaffin on November 15, 2018, 04:31:48 PM
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