Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: vypham2 on August 14, 2012, 03:09:36 PM
-
Hi all,
I have a simple gcode installed for my machine to move in a zig zag motion however I wanted to know if the mach 3 supports such configurations like DO Loop where I can type in a set of gcodes and have it repeat a consistent movement along the y axis... instead of writing out each individual increment (which takes up a whole lot of time and also looking for a more efficient way).
Any help would be appreciated.
Thanks,
V
-
You could probably code in incremental moves and repeat it as many times as you wanted, would mean you could just type the first zigzag then copy and paste it as many times as you want it to do that.
Hood
-
Hood-
Right now I have
g0 g21 g90 g50 g80 f100
g0 z0 g0 x0 y0
m98 p1 l10
g0 x0
m30
%
o1
g91 g1 z-.5 f50
g90
g1 x-50 f200
g1 y-2
g1 x0
g1 y-4
g1 x-50
g1 y-6
g1 x0
......ETC until .
g1 y-48
g1 x50
is there a way I can repeat the same incremental movements without typing it out all these gcodes?
V
-
See if this would work
G90G0X0X0X0
G91G1Z-.5F50
X-50F200
Y-2
X50
Then copy and paste the
X-50F200
Y-2
X50
as many times as you want it to repeat.
There are probably other ways but thats how I would do it.
Hood
-
Rather than cut and paste, put the lines to be repeated into a subroutine, then call the subroutine as many times as needed.
G90G0X0X0X0
G91G1Z-.5F50
M98 P01 L10
M30
O01
X-50F200
Y-2
X50
M99
%
Regards,
Ray L.
-
There you go even easier :)
Hood