>
> <snip>
>

> (- CUT HERE  ----------------------------------------------------------)
> O100 sub (square [x0] [y0] [z0] [zr] [f1] [f2])
>         (cut a 1x1 square)
>         (#1 = z0 = depth of cut)
>         (#2 = zr = retract after cut)
>         (#3 = f1 = feed to cutting depth)
>         (#4 = f2 = feed for square)
>         (assumes already at safety height)
> G0 X0 Y0
> G1 Z#1 F#3
> G1 X1 F#4
> G1 Y1
> G1 X0
> G1 Y0
> G0 Z#2
> O100 endsub
>
> O200 sub (l2r [x0] [y0] [dx] [count] [z0] [zr] [f1] [f2])
>         (#1 = x0 = least x coordinate)
>         (#2 = y0 = common y coordinate for all squares)
>         (#3 = dx = increment between x coordinates)
>         (#4 = count = number of squares in row)
>         (#5 = z0 = depth of cut)
>         (#6 = zr = retract after cut)
>         (#7 = f1 = feed to cutting depth)
>         (#8 = f2 = feed for square)
>         (cut squares from left to right at constant Y)
> (#9 = temporary for count of squares in row)
> #9=0
> O210 while [#9 LT #4]
> G0 X[#1+#9*#3] Y#2
> G92 X0 Y0
> O100 call [#5] [#6] [#7] [#8]
> G92.1
> #9=[#9+1]
> O210 endwhile
> O200 endsub
>
> O300 sub (r2l [x0] [y0] [dx] [count] [z0] [zr] [f1] [f2])
>         (parameters as for O200 sub)
>         (cut squares from right to left at constant Y)
> #9=[#4-1]
> O310 while [#9 GE 0]
> G0 X[#1+#9*#3] Y#2
> G92 X0 Y0
> O100 call [#5] [#6] [#7] [#8]
> G92.1
>  #9=[#9-1]
> O310 endwhile
> O300 endsub
>
> O400 sub (squares [x0] [y0] [dx] [dy] [xcount] [ycount] [z0] [zr] [f1]
> [f2])
>         (#1 = x0 = least x coordinate)
>         (#2 = y0 = least y coordinate)
>         (#3 = dx = increment between x coordinates)
>         (#4 = dy = increment between y coordinates)
>         (#5 = xcount = number of squares in row)
>         (#6 = ycount = number of rows)
>         (#7 = z0 = depth of cut)
>         (#8 = zr = retract after cut)
>         (#9 = f1 = feed to cutting depth)
>        (#10 = f2 = feed for square)
> (#11 = temporary for count of rows)
> #11=0
> O410 while [#11 LE #6]
> O420 if [[#11 MOD 2] EQ 0]
> O200 call [#1] [#2+#11*#4] [#3] [#5] [#7] [#8] [#9] [#10]
> O420 else
> O300 call [#1] [#2+#11*#4] [#3] [#5] [#7] [#8] [#9] [#10]
> O420 endif
> #11=[#11+1]
> O410 endwhile
> O400 endsub
>
> G92.1
> G20
> M3 S1000
> O400 call [0] [0] [1.5] [1.5] [4] [5] [-1] [1] [12] [30]
> M2
> (- CUT HERE  ----------------------------------------------------------)
>
> <snip>
>

Jeff,

My sincere thanks.  This code works like a charm.  I was able to insert a
snippet of code (gingerbread man ornament for the wife) and after a few
syntax error corrections (due tu my sneaker net) the parts laid out
perfectly.

I will add this to the wiki for others in the future.

Brian.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to