Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: fast89 on September 27, 2024, 07:46:34 AM

Title: Button to execute a mcode
Post by: fast89 on September 27, 2024, 07:46:34 AM
I need a switch to execute a macro.  I cannot just use a brain because the macro turns off one output and turns on another. And there is conflict if there is a mcode and brain turning on/off the same port and pin. Seems like there should be an easy way to do this. I wish i could just put the mcodes in the brain.
Title: Re: Button to execute a mcode
Post by: Graham Waterworth on September 27, 2024, 09:44:24 AM
Check out OEMTriggers
Title: Re: Button to execute a mcode
Post by: fast89 on September 27, 2024, 11:27:36 AM
Looks like OEMTriggers can not be edited. You can only select from a list.
Title: Re: Button to execute a mcode
Post by: fast89 on September 29, 2024, 05:25:45 PM
I made an onscreen button to open and close the collet via macro. Is there a way to assign it a number and be able to execute from brain or pokeys?
Title: Re: Button to execute a mcode
Post by: Graham Waterworth on September 30, 2024, 02:39:35 PM
If you save the script in the Macros folder with a name like M1003.m1s then you can call it from a button script with these two lines:-

Filepath = "C:\Mach3\macros\Mach3Mill\M1003.m1s"
RunScript(Filepath)

Or from MDI or in a program.