Uncommannded movement in X while G42 in Y
09 Apr 2012 18:33 - 09 Apr 2012 18:33 #19053
by jim_s
Uncommannded movement in X while G42 in Y was created by jim_s
The following lines of code make several finish passes across a small face parallel to the Y axis. I'm using cutter radius compensation to allow for the use of different tools. I am successfully setting up and making the entry and exit moves at each end of the pass, and am making the finishing passes in only one direction. Once the entry move is completed, there should be no movement in the X axis until the exit move, but for some reason, I am getting a very slight X axis movement 1/2 way across the finishing pass- just a few degrees of movement of the stepper motor, but it results in a blemish and discernable bump on the face when the slight X movement occurs. It happens in exactly the same spot on each pass, so its clearly something coming out of AXIS, seemingly intentionally - I just don't understand how or why. Can anyone potentially shed some light on this?
Thanks!
Jim
o<whileX> while [#<currX> LT #<stepWidth>]
#<currX> = [#<currX> + #<stepFinishPassWidth>]
o<if> if [#<currX> GT #<stepWidth>]
#<currX> = #<stepWidth>
o<if> endif
o<if> if [#<zFinishPassDepth> GT 0 OR #<stepFinishPassWidth> GT 0]
g0 x[#<currX> - #<_currToolRadius>*1.1] y[#<_currToolRadius>*1.1]
g42
g1 x#<currX> y#<_currToolRadius>
g1 z#<zDepth>
g1 y[-1*#<_pcWid> - #<_currToolRadius>*1.1]
g40
o<if> endif
g0 x[-1*#<_currToolRadius>*1.1]
g0 y[#<_currToolRadius>*1.1]
o<whileX> endwhile
Thanks!
Jim
o<whileX> while [#<currX> LT #<stepWidth>]
#<currX> = [#<currX> + #<stepFinishPassWidth>]
o<if> if [#<currX> GT #<stepWidth>]
#<currX> = #<stepWidth>
o<if> endif
o<if> if [#<zFinishPassDepth> GT 0 OR #<stepFinishPassWidth> GT 0]
g0 x[#<currX> - #<_currToolRadius>*1.1] y[#<_currToolRadius>*1.1]
g42
g1 x#<currX> y#<_currToolRadius>
g1 z#<zDepth>
g1 y[-1*#<_pcWid> - #<_currToolRadius>*1.1]
g40
o<if> endif
g0 x[-1*#<_currToolRadius>*1.1]
g0 y[#<_currToolRadius>*1.1]
o<whileX> endwhile
Last edit: 09 Apr 2012 18:33 by jim_s.
Please Log in or Create an account to join the conversation.
09 Apr 2012 22:01 #19065
by BigJohnT
Replied by BigJohnT on topic Re:Uncommannded movement in X while G42 in Y
What version of Linuxcnc are you running?
What happens when you run the code without the tool diameter compensation?
John
What happens when you run the code without the tool diameter compensation?
John
Please Log in or Create an account to join the conversation.
Time to create page: 0.055 seconds