Machsupport Forum

Mach Discussion => Brains Development => Topic started by: spunk on July 16, 2009, 06:20:27 AM

Title: marco or userbutton from brain
Post by: spunk on July 16, 2009, 06:20:27 AM
found this but don't really understand...

Set Trigger Macro using “Push User Button” in Brians:

First, you dont put the code in a button, you put it in a macro file. For
example file: m600.m1s
SetMessage( "This is a macro call..")

Then , you have to set that macro to be the default macro call with a call to
SetTriggerMacro( 600 ) at some point in the program, an init string could do
that if the SetTriggerMacro call were in another macro file that is called on
startup.  Then the brain will execute m600 whenever that brain termination code is
called.

someone???
Title: Re: marco or userbutton from brain
Post by: JHChoppers on November 24, 2010, 02:06:14 PM
Not sure I understand this either...but I think this is close to what I need.

How do I link an external PoKeys button to Macro Code?  I know how to add buttons onto the Mach3 Screens and link these to macros (ie M1000.m1s, M1001.m1s .... )  So, what is the trick to make an external button run some Macro Code via a Brain?

Thanks,
JH
Title: Re: marco or userbutton from brain
Post by: poppabear on November 25, 2010, 10:13:39 PM
see other thread simular topic, here, it is explained in more detail