Hello Guest it is January 10, 2026, 04:09:06 PM

Author Topic: I'm missing something fundamental with Macros.  (Read 661 times)

0 Members and 2 Guests are viewing this topic.

I'm missing something fundamental with Macros.
« on: January 03, 2026, 12:19:48 PM »
I assembled my Chinese milling machine which is about the size of a Bridgeport in 2007.  It uses parallel ports and Mach3 runs on XP.  Recently I upgraded to nema 34 hybrid stepper motors and have been trying to improve things a bit.

I have some programming experience with Visual Basic but cannot get a macro to work; I'm missing something fundamental.

I wrote:   DoOEMButton(110)

in a M120.m1s txt file in the macros folder. The intent is to start the spindle.  When I enter M120 in the MDI nothing happens.  So I put it in a txt file and try to run it as I would Gcode.   Nothing happens.

Offline TPS

*
  •  2,622 2,622
Re: I'm missing something fundamental with Macros.
« Reply #1 on: January 04, 2026, 05:54:59 AM »
for test that the macro is called you can enter a:
Code: [Select]
msgbox "i was here"

before your DoOEMButton

make sure you have a CRLF after your DoOEMButton(110)
so the M120.m1s has a empty line at he end.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: I'm missing something fundamental with Macros.
« Reply #2 on: January 05, 2026, 11:11:52 AM »
Thanks.   My fiber Internet has been down since Saturday.

I fixed the problem:  My Mach3 Macros folder had several other folders in it due to mach updating.  If I placed the .M1s file in the newest one it works.