Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Coolant Slinger on February 24, 2012, 12:35:08 PM

Title: #variable / macro programming
Post by: Coolant Slinger on February 24, 2012, 12:35:08 PM
I would like to write a few programs for simple tasks using #variables. What #'s can I use without srewing anything up? And are they permanent until overwritten. If anyone has examples of simple macros using # variables I would appreciate them.

Coolant Slinger
Title: Re: #variable / macro programming
Post by: BR549 on February 24, 2012, 02:04:13 PM
There is very little info on the #var ranges.  BUT 1-1000 should be safe to use. The range of 500-600 are persistant, meaning they are saved when Mach3 shuts down. The others are not saved, but do remain active while Mach3 is running.


G00 X0 Y0
G01 X0.000 Y #100 F#101
G01 X0.000 Y [#100 + 10]  F [#101* 1.25]

This is a very simple Code that shows the basic use of #vars  The 2 #var are assigned values at the start then CALLED as needed. Values can also be calculated on the fly.

Hope that helps, (;-) TP