repeat only making 2 instances of parts

More
02 Apr 2016 22:36 #72588 by burdickjp
I'm having trouble getting this repeat cycle to do more than 2 instances of the part. Any suggestions?
(tableClamps)
(program cuts in quadrant I)

#<countparts> = 3 ;how many parts to do
#<spaceparts> = 8 ;distance between repititions of the parts
#<zstep> = 1 ;distance to feed in z for every pass around

#<positionslot> = 9
#<heightslot> = 7.5
#<depthslot> = 5.5
#<diameterclearance> = 10.5
#<diametercounterbore> = 16.0

#<widthclamp> = 19
#<lengthclamp> = [#<positionslot> + #<diameterclearance>/2 + #<diametercounterbore>/2 + #<depthslot>]

G21 G90
G00 X0 Y0 Z10.0
G00 X0 Y-8.0
M03 S1200

o100 repeat [#<countparts>]
  M01
  G00 Z0
  G41.1 D6
  G01 Y0 F300
  o200 while [#<_z> GT [-#<widthclamp> + #<zstep>]]
    G91
    G01 Z-#<zstep>
    G01 Y[#<heightslot> + #<positionslot>]
    G02 X#<positionslot> Y0 I[#<positionslot>/2] J0
    G03 X#<positionslot> Y-#<positionslot> I#<positionslot> J0
    G01 X[#<lengthclamp> - #<positionslot> *2]
    G01 Y-#<heightslot>
    G01 X-[#<lengthclamp>]
  o200 endwhile
  G90 G40
  G00 Y-8.0
  G00 Z1.0
  G00 X[#<lengthclamp> + #<spaceparts>]
o100 endrepeat

M30
%

Please Log in or Create an account to join the conversation.

More
02 Apr 2016 23:00 - 02 Apr 2016 23:01 #72589 by BigJohnT
It's because your not updating the X position, it will cut all past the first one in the second location. Save the current X then add the offset.

JT
Last edit: 02 Apr 2016 23:01 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
02 Apr 2016 23:04 #72590 by burdickjp
I see it! Thank you!

Please Log in or Create an account to join the conversation.

More
03 Apr 2016 00:47 #72594 by burdickjp
Here it is, corrected.
(tableClamps)
(program cuts in quadrant I)

#<countparts> = 3 ;how many parts to do
#<spaceparts> = 8 ;distance between repititions of the parts
#<zstep> = 1 ;distance to feed in z for every pass around

#<positionslot> = 9
#<heightslot> = 7.5
#<depthslot> = 5.5
#<diameterclearance> = 10.5
#<diametercounterbore> = 16.0

#<widthclamp> = 19
#<lengthclamp> = [#<positionslot> + #<diameterclearance>/2 + #<diametercounterbore>/2 + #<depthslot>]

G21 G90
G00 X0 Y0 Z10.0
G00 X0 Y-8.0
M03 S1200

o100 repeat [#<countparts>]
  M01
  G00 Z0
  G41.1 D6
  G01 Y0 F300
  o200 while [#<_z> GT [-#<widthclamp> + #<zstep>]]
    G91
    G01 Z-#<zstep>
    G01 Y[#<heightslot> + #<positionslot>]
    G02 X#<positionslot> Y0 I[#<positionslot>/2] J0
    G03 X#<positionslot> Y-#<positionslot> I#<positionslot> J0
    G01 X[#<lengthclamp> - #<positionslot> *2]
    G01 Y-#<heightslot>
    G01 X-[#<lengthclamp>]
  o200 endwhile
  G90 G40
  G00 Y-8.0
  G00 Z1.0
  G00 X[#<_x> + #<lengthclamp> + #<spaceparts>]
o100 endrepeat

M30
%

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum