I’m going to start working through porting my mach 3 macros over to mach 4. I use the 2010 screenset and the m6 macro is the only thing I want from it in mach 4, everything else I’ve made should be easy to do.
In the setup portion of the m6 macro you first measure the z height of the stock and then the bit moves over to a fixed position and records the difference between the two and does that.
When m6 is called during a job, the spindle stops and moves to the tool change position. Swap tools and then moves to the permanent plate to touch. Recall the saved difference between the plates and use that variable to set the new tools height.
I’ve never used lua but it looks much better than vb. At least it looks more like what I expect to be a programming language.
I’m sure it’s possible to do this setup but are variables able to be stored long term and then recalled for a macro later on? I found some videos from 7 years ago about an m6 macro that almost does this except that it doesn’t seem to to the setup portion that allows you to use 2 plates. One moveable and one fixed to get the difference variable stored. It seems to only use 1 fixed plate and I need to use the surface of the material as the first touch position.