Hello Guest it is May 01, 2025, 05:02:08 AM

Author Topic: Line reading in a macro in Mach 3  (Read 727 times)

0 Members and 1 Guest are viewing this topic.

Line reading in a macro in Mach 3
« on: February 23, 2025, 05:29:09 AM »
I’m am writing a macro to perform a function and need it to read in the rest of the line to capture a value.
Eg. M103 V45
The macro M103 has to read in the 45 as a value to do a math function. The V could be left off.
Too many years of not using Mach 3. And no I don’t wish to move to Mach 4 for this project atm.
Any help would be appreciated.

Offline Graham Waterworth

*
  • *
  •  2,779 2,779
  • Yorkshire Dales, England
Re: Line reading in a macro in Mach 3
« Reply #1 on: February 23, 2025, 12:10:46 PM »
In your Gcode set #1000 = 45 before calling M103

Then in your macro V_Var = GetParam(1000)

Just do the M103 on its own

Without engineers the world stops
Re: Line reading in a macro in Mach 3
« Reply #2 on: February 24, 2025, 03:31:15 AM »
Thanks, I will give that a try.