Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 08:47:01 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  A problem writing macros
Pages: 1   Go Down
Print
Author Topic: A problem writing macros  (Read 188 times)
0 Members and 2 Guests are viewing this topic.
drbricolage
Active Member

Offline Offline

Posts: 2


View Profile
« on: October 20, 2011, 10: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.
Logged
Overloaded
Global Moderator
*
Offline Offline

Posts: 3,073



View Profile
« Reply #1 on: October 20, 2011, 10: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).
Logged

"I haven't failed. I've just found 10,000 ways that won't work."         Edison

"You cannot help men permanently by doing for them what they could and should do for themselves."
Abe Lincoln
drbricolage
Active Member

Offline Offline

Posts: 2


View Profile
« Reply #2 on: October 20, 2011, 10:30:22 AM »

Fantastic, it works! I just couldn't see where I was going wrong. Many many thanks.
Logged
Hood
Active Member

Offline Offline

Posts: 17,368


Carnoustie, Scotland


View Profile
« Reply #3 on: October 20, 2011, 10: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
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!