Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: 3IMOH on May 31, 2006, 06:12:16 PM

Title: Inline variables and loops?
Post by: 3IMOH on May 31, 2006, 06:12:16 PM
Hello-

I have been using a shopbot for a while now, and I am considering building a router that would be controlled via Mach 3.  The shopbot code is a similar syntax to g-code, but one thing it has is the ability to specify variables in the file instead of hard coding feedrates, etc. It also has the ability to use conditionals and loops, etc.

Is there something similar that can be done with Mach 3 and g-code?

thanks,
Howie

Title: Re: Inline variables and loops?
Post by: Graham Waterworth on June 01, 2006, 03:30:29 AM
Yes, you can do things like this:-

#100=5
G00 X[#100*10] Y[#100*10]
M30

Graham.
Title: Re: Inline variables and loops?
Post by: Tarak on June 24, 2006, 08:49:10 PM
Can you do any commands like, IF [#101EQ0] GOTO10?
Is it possible to get a list of all the possible variable commands.