Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- G17 G21 G54 G61 G90 G40 G49 G80
- #100 = 7 (items X)
- #101 = 3 (items Y)
- #102 = 40 ( X pattern distance)
- #103 = 30 ( Y pattern Distance)
- #104 = -200 ( X Start of 1st pattern )
- #105 = 50 ( Y Start of 1st pattern )
- #110 = 1 (pattern main Axis direction X=0 Y=1)
- #111 = 0 ( pattern back and Force 1 = YES )
- (pattern shape )
- O100 sub
- G0 X[#1+0 ] Y[#2+8 ]
- G1 Z1 F300
- G1 Z-1 F20
- G1 X[#1+0 ] Y[#2+10 ] F300
- G1 X[#1+10 ] Y[#2+10 ] ( make a 20 mm square center given )
- G1 X[#1+10 ] Y[#2-10 ]
- G1 X[#1-10 ] Y[#2-10 ]
- G1 X[#1-10 ] Y[#2+10 ]
- G1 X[#1+0 ] Y[#2+10]
- G1 X[#1+0 ] Y[#2+8]
- G0 Z5
- O100 endsub
- ( ----- do not change here -----)
- o102 if [#110 EQ 0] (main direction X)
- #12 = 1 (Y item Counter)
- o104 while [#12 LT #101 +1] ( While Y items )
- #10 = 1 (X item Counter)
- #13 = [#12 * #103] (calculate Y position)
- #13 = [ #13 + #105] ( Y position of pattern )
- o103 while [#10 LT #100 +1] ( While X items )
- #11 = [ #10 * #102 ] (calculate distance of pattern)
- #11 = [ #11 + #104 ] (add the Startofset)
- O100 call [#11] [#13] ( mill pattern X)
- #10 = [#10 +1] (next item X)
- o103 endwhile
- #12 = [ #12 +1 ] (next Y item )
- o104 endwhile
- o102 else (main direciton Y)
- #12 = 1 (X item Counter)
- o104 while [#12 LT #100 +1] ( While X items )
- #10 = 1 (Y item Counter)
- #13 = [#12 * #102] (calculate X position)
- #13 = [ #13 + #104] ( X position of pattern )
- o103 while [#10 LT #101 +1] ( While Y items )
- #11 = [ #10 * #103 ] (calculate distance of pattern)
- #11 = [ #11 + #105 ] (add the Startofset)
- O100 call [#13] [#11] ( mill pattern )
- #10 = [#10 +1] (next item Y)
- o103 endwhile
- #12 = [ #12 +1 ] (next X item )
- o104 endwhile
- o102 endif
- M30
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement