Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: drbricolage on October 20, 2011, 11:09:38 AM

Title: A problem writing macros
Post by: drbricolage on October 20, 2011, 11:09:38 AM
I am trying to convert my mill with Mach3 and I've run into a bit of a problem. I want to toggle an output bit to control a solenoid to lock my Z axis. I wrote two macros ( M64 and M65) as follows:
M64
ActivateSignal(output4)
and M65
DeactivateSignal(output4)
I set up the output to connect to the right pin and put these in my profile macro folder as M64.mls and M65.mls. I can't see that there is anything else to do but when I try these under MSI nothing happens. What am I doing wrong? I would be very grateful for some help.
Title: Re: A problem writing macros
Post by: Overloaded on October 20, 2011, 11:22:17 AM
Try   .m1s  for the extension.
Also, I think you shold use macros over 100 as many below are used internally. (from memory, which is weak).
Title: Re: A problem writing macros
Post by: drbricolage on October 20, 2011, 11:30:22 AM
Fantastic, it works! I just couldn't see where I was going wrong. Many many thanks.
Title: Re: A problem writing macros
Post by: Hood on October 20, 2011, 11:33:04 AM
Also worth mentioning you should really be using M101 and higher for custom M codes, under 100 are meant to be reserved for  Mach internally.
Hood