Learning about Mach 4 macros

Macros would be great! I’ve been interested in learning more about things other than g54 style saved offsets for a long time.

What in particular are you trying to do? There are some interesting things you can program and tweak in Mach.

2 Likes

I haven’t done any scripting but hope to set up an ATC spindle soon. So far, all I know is that there’s a Mach4 scripting manual and that it’s not too hard to find scripts and YouTube instruction videos online. If anyone’s found particularly helpful resources, please share them if you’re willing!

There is a lua scripting guide for Mach in the Mach folder. It took me a while to realize it’s there when I first went looking for a lua command reference.

I should look into that also. I tried writing fanuc macro b on mach when I first got my avid. Of course no dice. Macro is very powerful, but takes time to learn syntax.

1 Like

What about a brainstorm for what macros and buttons you want?

Automating anything would be great. For example, turning on a vacuum (dust collection) using outputs on the controller would be a great start for me. And I wouldn’t even care if I had to do some wiring to get an additional relay in there to make it happen.

I’ve even contemplated using pneumatically actuated clamps for work holding, or maybe a home made vacuum table that is activated / deactivated automatically. This would be awesome for making batches of engraved signs where tool force is minimal and clamps are often in the way.

1 Like

Side note on the vacuum table - I find I don’t want that controlled by gcode. It’s better to have it remain on throughout via manual control in case I need to run multiple files, or some such.

Gcode control of dust collection via M7/8/9 is such a timesaver though. Highly recommended

Just the kind of wisdom I was hoping to gain on this forum. Thanks! @dromeister

If you’re running an Avid CNC control there are two 110 relays with power plugs that are included. You can activate them whenever you want.

What is the amperage limit for these? These could be a great option for my dedicated dust collector.

https://www.avidcnc.com/support/instructions/electronics/pnp/manual/17.4/initialSetup/

Your my hero! Plus 20 characters. :grinning: