Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: TheLaserShop on January 01, 2010, 06:08:44 PM

Title: Need an easy to understand "macropump" example
Post by: TheLaserShop on January 01, 2010, 06:08:44 PM
Many hours of reading, searching forums, studying manuals.... my Bridgeport conversion is almost there. Seems the "macropump" file is the way to go for a couple of issues I have. I have an air spindle brake that must be activated before the spindle turns on. I tried this with a brain but the spindle would start at mach3 loading. Other than that it worked but there are a few other (if this,then do this) issues that I cant seem to accomplish with the brain editor. Wonder if someone could just show me what the macropump format would look like and I can work on it from there.

Spindle M3 is pin 1 and M4 is pin 2 outputs.
Air brake is pin 5 output.
I also have a low air input on pin 11 and a spindle overload on pin 12. I need the spindle to be disabled if there is a low air signal (if I forgot to turn the compressor on or if an air line should break while the spindle is running) both before the spindle is activated and while running. I don't want an EStop, just for the spindle to be disabled. Air brake also needs to be disabled after "spindle off". (disable engages the brake)

macropump might be something like:

check for low air input and disable spindle (wont start)
if low air stop spindle and disable brake
spindle off disable brake output
same with spindle overload

Thanks in advance, RonO
Title: Re: Need an easy to understand "macropump" example
Post by: HimyKabibble on January 01, 2010, 06:49:06 PM
If Spindle operation is dependant on some other operation being done, or vice-versa, it would make a whole lot more sense to put those checks into the M3, M4 andM5 macros than into the macropump.

Regards,
Ray L.
Title: Re: Need an easy to understand "macropump" example
Post by: TheLaserShop on January 02, 2010, 10:35:03 AM
I guess I thought the only time those macros came into play was with running a program. Are you saying that when I mouse click the spindle icon it is reading the "M3" macro? How does the software know to "M5" when clicked again?
Title: Re: Need an easy to understand "macropump" example
Post by: HimyKabibble on January 02, 2010, 12:19:38 PM
I guess I thought the only time those macros came into play was with running a program. Are you saying that when I mouse click the spindle icon it is reading the "M3" macro? How does the software know to "M5" when clicked again?

There are buttons in the default screenset that control the spindle without invoking the macros (a VERY bad idea, that will be fixed in v4), but that is easily fixed by simply editing the screenset to make those buttons call the macros.

Regards,
Ray L.
Title: Re: Need an easy to understand "macropump" example
Post by: TheLaserShop on January 02, 2010, 12:44:41 PM
Tried it and the macro does work in code but does not work when clicking spindle start. There must be an easy way to do this. I thought macropump would be the way to go but back to my original question I just dont know how to script it.
Title: Re: Need an easy to understand "macropump" example
Post by: HimyKabibble on January 02, 2010, 01:11:50 PM
Tried it and the macro does work in code but does not work when clicking spindle start. There must be an easy way to do this. I thought macropump would be the way to go but back to my original question I just dont know how to script it.

See my last post - this is easily fixed....