Hello Guest it is May 09, 2025, 02:04:59 AM

Author Topic: Button to execute a mcode  (Read 8115 times)

0 Members and 1 Guest are viewing this topic.

Offline fast89

*
  •  159 159
Button to execute a mcode
« 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.

Offline Graham Waterworth

*
  • *
  •  2,782 2,782
  • Yorkshire Dales, England
Re: Button to execute a mcode
« Reply #1 on: September 27, 2024, 09:44:24 AM »
Check out OEMTriggers
Without engineers the world stops

Offline fast89

*
  •  159 159
Re: Button to execute a mcode
« Reply #2 on: September 27, 2024, 11:27:36 AM »
Looks like OEMTriggers can not be edited. You can only select from a list.

Offline fast89

*
  •  159 159
Re: Button to execute a mcode
« Reply #3 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?

Offline Graham Waterworth

*
  • *
  •  2,782 2,782
  • Yorkshire Dales, England
Re: Button to execute a mcode
« Reply #4 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.
Without engineers the world stops