# Learning about Mach 4 macros

**URL:** <https://forum.avidcnc.com/t/learning-about-mach-4-macros/775>\
**Category:** General Chat\
**Created:** [October 15, 2022, 10:04pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775 "2022-10-15T22:04:53Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr\_Auggy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/mr_auggy/32/228_2.png) [@Mr\_Auggy](https://forum.avidcnc.com/u/Mr_Auggy)\
**Post date:** [October 15, 2022, 10:04pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/1 "2022-10-15T22:04:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/eric/32/3220_2.png) [@Eric](https://forum.avidcnc.com/u/Eric)\
**Post date:** [October 16, 2022, 12:06am UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/2 "2022-10-16T00:06:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Stephen](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/stephen/32/2569_2.png) [@Stephen](https://forum.avidcnc.com/u/Stephen)\
**Post date:** [October 16, 2022, 1:03pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/3 "2022-10-16T13:03:23Z")

</div>

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](https://www.machsupport.com/help-learning/product-manuals/#tabs-1) 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!

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/eric/32/3220_2.png) [@Eric](https://forum.avidcnc.com/u/Eric)\
**Post date:** [October 16, 2022, 1:04pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/4 "2022-10-16T13:04:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BobH](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@BobH](https://forum.avidcnc.com/u/BobH)\
**Post date:** [October 16, 2022, 3:43pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/5 "2022-10-16T15:43:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abakker](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@abakker](https://forum.avidcnc.com/u/abakker)\
**Post date:** [October 16, 2022, 5:33pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/6 "2022-10-16T17:33:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mr\_Auggy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/mr_auggy/32/228_2.png) [@Mr\_Auggy](https://forum.avidcnc.com/u/Mr_Auggy)\
**Post date:** [October 17, 2022, 1:16am UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/7 "2022-10-17T01:16:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dromeister](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@dromeister](https://forum.avidcnc.com/u/dromeister)\
**Post date:** [October 17, 2022, 2:44am UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/8 "2022-10-17T02:44:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mr\_Auggy](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/mr_auggy/32/228_2.png) [@Mr\_Auggy](https://forum.avidcnc.com/u/Mr_Auggy)\
**Post date:** [October 17, 2022, 10:53am UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/9 "2022-10-17T10:53:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/eric/32/3220_2.png) [@Eric](https://forum.avidcnc.com/u/Eric)\
**Post date:** [October 17, 2022, 11:49am UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/10 "2022-10-17T11:49:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Al3x](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Al3x](https://forum.avidcnc.com/u/Al3x)\
**Post date:** [October 17, 2022, 9:28pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/11 "2022-10-17T21:28:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Eric](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.avidcnc.com/eric/32/3220_2.png) [@Eric](https://forum.avidcnc.com/u/Eric)\
**Post date:** [October 18, 2022, 5:36pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/12 "2022-10-18T17:36:25Z")

</div>

[https://www.avidcnc.com/support/instructions/electronics/pnp/manual/17.4/initialSetup/](https://www.avidcnc.com/support/instructions/electronics/pnp/manual/17.4/initialSetup/)

---

<div class="post-metadata">

**Author:** ![Al3x](https://avatars.discourse-cdn.com/v4/letter/a/f17d59/32.png) [@Al3x](https://forum.avidcnc.com/u/Al3x)\
**Post date:** [October 18, 2022, 9:13pm UTC](https://forum.avidcnc.com/t/learning-about-mach-4-macros/775/13 "2022-10-18T21:13:56Z")

</div>

Your my hero! Plus 20 characters. 😀
