Loss of X position while running program
- LearningLinuxCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 327
- Thank you received: 61
29 Aug 2015 09:55 #61879
by LearningLinuxCNC
Loss of X position while running program was created by LearningLinuxCNC
Last weekend I ran my first part in steel with my newly retrofitted machine. Somewhere during the cutting of the part the X position was offset to the positive direction by approx 0.030". I first roughed out the part with a 1/2" roughing end mill using a HSM tool path. There was significant chatter during the cutting of the tool path but the part did not physically move in the vise. Then there was another roughing cut with a 1/4" roughing end mill using HSM tool paths. Then there was a finish cut using a regular end mill. When the finish cut was performed the finish cut would cut on the one side of the part while not cutting on the opposite side of the part. This is shown in the pictures below. You can see the lines on the side of the part where the roughing end mill cut but the finish end mill did not cut.
This is a servo driven machine so the issue is not due to lost steps. The servo on the X axis is coupled to the ball screw with a timing belt and pulleys. The pulleys are mounted to the shafts with a taper compression system that utilizes two pairs of cones and cups that are slid onto the shaft and inside the pulley. Then there is a compression ring that is bolted to the pulley that compresses the cones into the cups. There is no key way so I am suspecting that the shaft is spinning slightly in the pulley resulting in the lost position. I have match marked my pulleys to the shafts so after my next machining session I will check to see if they have changed position any.
I checked and I did not see any offsets in LinuxCNC that could cause this behavior. Is there anything else that could cause this?
Here is a picture of both parts that were machined out of one piece of bar stock.
Here is a picture showing the lines on the one side where the finish cut did not clean up after the roughing cut.
This is a servo driven machine so the issue is not due to lost steps. The servo on the X axis is coupled to the ball screw with a timing belt and pulleys. The pulleys are mounted to the shafts with a taper compression system that utilizes two pairs of cones and cups that are slid onto the shaft and inside the pulley. Then there is a compression ring that is bolted to the pulley that compresses the cones into the cups. There is no key way so I am suspecting that the shaft is spinning slightly in the pulley resulting in the lost position. I have match marked my pulleys to the shafts so after my next machining session I will check to see if they have changed position any.
I checked and I did not see any offsets in LinuxCNC that could cause this behavior. Is there anything else that could cause this?
Here is a picture of both parts that were machined out of one piece of bar stock.
Here is a picture showing the lines on the one side where the finish cut did not clean up after the roughing cut.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 4978
- Thank you received: 1376
29 Aug 2015 19:45 #61885
by Todd Zuercher
Replied by Todd Zuercher on topic Loss of X position while running program
Noise in the encoder signal could cause drift in position.
Please Log in or Create an account to join the conversation.
29 Aug 2015 22:13 #61891
by PCW
Replied by PCW on topic Loss of X position while running program
Yeah, encoder noise can cause a slow drift
mechanical slip is more likely to happen all at once when under load
Not sure if you can tell which happened
For encoder issues (where you have a index)
it would be good if the driver could do a index sanity check
(always enable index, and check that rawcounts@index mod counts/turn ~= 0)
mechanical slip is more likely to happen all at once when under load
Not sure if you can tell which happened
For encoder issues (where you have a index)
it would be good if the driver could do a index sanity check
(always enable index, and check that rawcounts@index mod counts/turn ~= 0)
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 327
- Thank you received: 61
30 Aug 2015 00:48 #61896
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Loss of X position while running program
Todd and PCW,
I had also thought about encoder noise. I hope I don't have that problem but I might. I am using differential encoder signals through my long cables with a differential to single ended adapter directly adjacent to the Pico UPC board. Also the encoder cables are shielded and only grounded at the main control panel.
Unfortunately I can't be for sure if the shift was all at once or if it happened over the course of the program. I do know that there was no shift during the finish milling passes as there were multiple depths of cut on the finish passes and they were all perfectly in line. But come to think of it if it kept shifting to the +X direction then the side that was cut with the finishing passes would have been flat as the cutter would have cleaned up the entire side on the last pass. Anyway I don't think that it shifted during the finishing passes and they lasted a lot longer and I would have thought been more prone to shifting.
As for your sanity check PCW, would I do this in HAL and throw up an message box if the mod was not = 0? Would there be a way to correct a shifting position on the fly by using the index?
I think that the issue was due to mechanical slip but unfortunately I don't have another chunk of steel to run the same part again to test it out now that I have my shafts and pulleys marked.
I will try to get the encoder check put in my configuration before I run my next part. Maybe i will find the culprit on it. Although it will be aluminum and should not have as high of mechanical loads. I will try to push the hogging to see what happens.
Thanks,
Jim
I had also thought about encoder noise. I hope I don't have that problem but I might. I am using differential encoder signals through my long cables with a differential to single ended adapter directly adjacent to the Pico UPC board. Also the encoder cables are shielded and only grounded at the main control panel.
Unfortunately I can't be for sure if the shift was all at once or if it happened over the course of the program. I do know that there was no shift during the finish milling passes as there were multiple depths of cut on the finish passes and they were all perfectly in line. But come to think of it if it kept shifting to the +X direction then the side that was cut with the finishing passes would have been flat as the cutter would have cleaned up the entire side on the last pass. Anyway I don't think that it shifted during the finishing passes and they lasted a lot longer and I would have thought been more prone to shifting.
As for your sanity check PCW, would I do this in HAL and throw up an message box if the mod was not = 0? Would there be a way to correct a shifting position on the fly by using the index?
I think that the issue was due to mechanical slip but unfortunately I don't have another chunk of steel to run the same part again to test it out now that I have my shafts and pulleys marked.
I will try to get the encoder check put in my configuration before I run my next part. Maybe i will find the culprit on it. Although it will be aluminum and should not have as high of mechanical loads. I will try to push the hogging to see what happens.
Thanks,
Jim
Please Log in or Create an account to join the conversation.
- johns00056
- Offline
- Premium Member
-
Less
More
- Posts: 108
- Thank you received: 2
30 Aug 2015 21:47 - 31 Aug 2015 04:47 #61924
by johns00056
Replied by johns00056 on topic Loss of X position while running program
PCW- is there an example available that shows how one could detect position drift using rawcounts?
My machine does not drift , as far as I know. Is this something that I need to worry about?
My encoders have an index which I am using for homing.
I suppose that I could just re-home the machine before a critical operation.
My machine does not drift , as far as I know. Is this something that I need to worry about?
My encoders have an index which I am using for homing.
I suppose that I could just re-home the machine before a critical operation.
# ################
# X [0] Axis
# ################
# axis enable chain
newsig emcmot.00.enable bit
sets emcmot.00.enable FALSE
net emcmot.00.enable => pid.0.enable
#net emcmot.00.enable => bldc.0.init
net emcmot.00.enable => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.amp_enable
net emcmot.00.enable <= axis.0.amp-enable-out
# encoder feedback
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.counter-mode 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.filter 1 # 1 ,filters out encoder noise, 15 clocks- default
is 3 clocks before change #
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.index-mask-invert 0
setp hm2_[HOSTMOT2](BOARD).0.encoder.00.scale [AXIS_0]INPUT_SCALE
net motor.00.pos-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.position => pid.0.feedback
net motor.00.vel-fb hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => pid.0.feedback-deriv
net motor.00.pos-fb => axis.0.motor-pos-fb #push copy back to Axis GUI
# set PID loop gains from inifile
setp pid.0.Pgain [AXIS_0]P
setp pid.0.Igain [AXIS_0]I
setp pid.0.Dgain [AXIS_0]D
setp pid.0.bias [AXIS_0]BIAS
setp pid.0.FF0 [AXIS_0]FF0
setp pid.0.FF1 [AXIS_0]FF1
setp pid.0.FF2 [AXIS_0]FF2
setp pid.0.deadband [AXIS_0]DEADBAND
setp pid.0.maxoutput [AXIS_0]MAX_OUTPUT
#bldc setup### loadrt bldc cfg=qh,qh,qh ###qhi causes following error so is not usable 4/21/14 john seward#
net h1 hm2_5i25.0.7i84.0.1.input-16 bldc.0.hall1
net h2 hm2_5i25.0.7i84.0.1.input-17 bldc.0.hall2
net h3 hm2_5i25.0.7i84.0.1.input-18 bldc.0.hall3
setp bldc.0.poles 8
setp bldc.0.scale -8192
setp bldc.0.pattern 22
setp bldc.0.rev true
setp bldc.0.initvalue 0.2
#setp hm2_5i25.0.8i20.0.0.max_current 15 # this line is not used in ubuntu 2.5.3 ##########
# position command signals
net emcmot.00.pos-cmd axis.0.motor-pos-cmd => pid.0.command
net motor.00.command pid.0.output => bldc.0.value
net motor.00.current bldc.0.out => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.current
#net motor.00.current hm2_[HOSTMOT2](BOARD).0.encoder.00.velocity => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.current
# commutation angle signals
net motor.00.rawcounts hm2_[HOSTMOT2](BOARD).0.encoder.00.rawcounts => bldc.0.rawcounts
#net motor.00.index-enable hm2_[HOSTMOT2](BOARD).0.encoder.00.index-enable => bldc.0.index-enable#I forget why I have this commented out#
net motor.00.angle bldc.0.rotor-angle => hm2_[HOSTMOT2](BOARD).0.8i20.0.0.angle
Last edit: 31 Aug 2015 04:47 by BigJohnT. Reason: add code tags
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 327
- Thank you received: 61
31 Aug 2015 08:37 #61930
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Loss of X position while running program
PCW,
Is there a HAL component that does what you are recommending to check the mod of the encoder count at the index pulse?
If not I am going to attempt to write one. Should be pretty simple. It will be my first scratch written HAL component.
Is there a HAL component that does what you are recommending to check the mod of the encoder count at the index pulse?
If not I am going to attempt to write one. Should be pretty simple. It will be my first scratch written HAL component.
![B) B)](/media/kunena/emoticons/cool.png)
Please Log in or Create an account to join the conversation.
01 Sep 2015 00:08 #61950
by PCW
Replied by PCW on topic Loss of X position while running program
Unfortunately I think this requires driver changes to work
(also I'm not sure how the index logic works in the Pico system hardware)
(also I'm not sure how the index logic works in the Pico system hardware)
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 327
- Thank you received: 61
01 Sep 2015 01:15 #61952
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic Loss of X position while running program
PCW,
I think my HAL component will be able to check for the error. Obviously it won't be able to fix the error.
I will check with Jon to see if there is anything that can be done in the Pico board. I assumed you would not be able to help there. Thanks anyway.
FWIW, I plan to try Mesa on my lathe project to see how the two systems compare.
I think my HAL component will be able to check for the error. Obviously it won't be able to fix the error.
I will check with Jon to see if there is anything that can be done in the Pico board. I assumed you would not be able to help there. Thanks anyway.
FWIW, I plan to try Mesa on my lathe project to see how the two systems compare.
Please Log in or Create an account to join the conversation.
Time to create page: 0.090 seconds