Hello Guest it is April 20, 2024, 07:02:52 AM

Author Topic: simple macro not running  (Read 4150 times)

0 Members and 1 Guest are viewing this topic.

Offline nso

*
  •  36 36
    • View Profile
simple macro not running
« on: December 16, 2013, 03:09:01 PM »
hi everyone
i have a problem with running  a simple macro...

'M2000.M1S'
If isactive(input1) Then

doButton (1021)

MsgBox "servo alarm"

End If             

i write this and save to  mill macro folder by .m1s excitation ,and i check enable( run macro pump ) in config menu...
 
when i active input 1,then do nothing ..
now what is my fault ?!


Re: simple macro not running
« Reply #1 on: December 16, 2013, 03:26:24 PM »
Hi,
close and restart Mach3.
That is needed every time you activate or deactivate the macropump.

Alex

Offline nso

*
  •  36 36
    • View Profile
Re: simple macro not running
« Reply #2 on: December 16, 2013, 11:22:15 PM »
thanks cncalex
but i do that,and not running again...
Re: simple macro not running
« Reply #3 on: December 17, 2013, 07:10:13 AM »
sorry, didn't look close enogh.

when you want to run the macropump you need a  macro named  macropump.m1s
only this one runs as macropump.

 ' macropump.m1s '

If isactive(input1) Then
doOEMButton (1021)
MsgBox "servo alarm"
End If 

doen't forget to close and restart Mach3.
it is needed every time you activate or deactivate or edit the macropump.m1s

I for myself prefere doing things like that using a brain.
see pict.

alex

Offline nso

*
  •  36 36
    • View Profile
Re: simple macro not running
« Reply #4 on: December 17, 2013, 01:49:58 PM »
yeeeeeeeeess
that is point ,file name should be( macropump.m1s) you right .. thanks alot
so if need more macro then how can do?
Re: simple macro not running
« Reply #5 on: December 17, 2013, 02:04:18 PM »
there is only this one macro.
everything you want to run must be in this.

alex
Re: simple macro not running
« Reply #6 on: December 17, 2013, 02:08:25 PM »
you can create other Macros like M1234.m1s  but this will only be executed one time when you call it
from MDI or G-Code
alex

Offline nso

*
  •  36 36
    • View Profile
Re: simple macro not running
« Reply #7 on: December 17, 2013, 11:39:21 PM »
i got it ...thanks a lot my friend   :)

Re: simple macro not running
« Reply #8 on: December 18, 2013, 07:39:08 AM »
No prob. glad you got it .  :)
alex