daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Apr 29th, 2013 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. G17 G21 G54 G61 G90 G40 G49 G80  
  2. #100 = 7  (items X)
  3. #101 = 3   (items Y)
  4. #102 = 40 ( X pattern distance)
  5. #103 = 30 ( Y pattern Distance)
  6. #104 = -200 ( X Start of 1st pattern )
  7. #105 = 50  ( Y Start of 1st pattern )
  8. #110 = 1 (pattern main Axis direction  X=0 Y=1)
  9. #111 = 0 ( pattern back and Force 1 = YES )
  10.  
  11. (pattern shape )
  12. O100 sub
  13. G0 X[#1+0 ]  Y[#2+8 ]
  14. G1 Z1 F300
  15. G1 Z-1 F20
  16. G1 X[#1+0 ]  Y[#2+10 ] F300      
  17. G1 X[#1+10 ]  Y[#2+10 ]       ( make a 20 mm square center given )
  18. G1 X[#1+10 ]  Y[#2-10 ]  
  19. G1 X[#1-10 ]  Y[#2-10 ]
  20. G1 X[#1-10 ]  Y[#2+10 ]
  21. G1 X[#1+0 ]  Y[#2+10]
  22. G1 X[#1+0 ]  Y[#2+8]
  23. G0 Z5
  24. O100 endsub
  25.  
  26.  
  27. ( ----- do not change here -----)
  28.  
  29. o102 if [#110 EQ 0] (main direction X)
  30.         #12 = 1   (Y item Counter)     
  31.         o104 while [#12 LT #101 +1] ( While Y items )
  32.                 #10 = 1   (X item Counter)
  33.                 #13 = [#12 * #103] (calculate Y position)
  34.                 #13 = [ #13 + #105] ( Y position of pattern )
  35.                 o103 while [#10 LT #100 +1] ( While X items )
  36.                     #11 = [ #10 * #102 ] (calculate distance of pattern)
  37.                     #11 = [ #11 + #104 ] (add the Startofset)
  38.                     O100 call [#11] [#13] ( mill pattern X)
  39.                     #10 = [#10 +1] (next item X)
  40.                 o103 endwhile
  41.                 #12 = [ #12 +1 ] (next Y item )
  42.         o104 endwhile
  43. o102 else  (main direciton Y)
  44.         #12 = 1   (X item Counter)     
  45.         o104 while [#12 LT #100 +1] ( While X items )
  46.                 #10 = 1   (Y item Counter)
  47.                 #13 = [#12 * #102] (calculate X position)
  48.                 #13 = [ #13 + #104] ( X position of pattern )
  49.                 o103 while [#10 LT #101 +1] ( While Y items )
  50.                     #11 = [ #10 * #103 ] (calculate distance of pattern)
  51.                     #11 = [ #11 + #105 ] (add the Startofset)
  52.                     O100 call [#13] [#11] ( mill pattern )
  53.                     #10 = [#10 +1] (next item Y)
  54.                 o103 endwhile
  55.                 #12 = [ #12 +1 ] (next X item )
  56.         o104 endwhile
  57.  
  58. o102 endif
  59. M30
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top