Hello Guest it is March 19, 2024, 12:13:53 AM

Author Topic: A problem writing macros  (Read 2922 times)

0 Members and 1 Guest are viewing this topic.

A problem writing macros
« 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.
Re: A problem writing macros
« Reply #1 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).
Re: A problem writing macros
« Reply #2 on: October 20, 2011, 11:30:22 AM »
Fantastic, it works! I just couldn't see where I was going wrong. Many many thanks.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: A problem writing macros
« Reply #3 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