5i25 - Using Encoder on Axis
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
24 Sep 2015 04:36 #62908
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic 5i25 - Using Encoder on Axis
I don't believe you have the encoder connected properly to the step generator. I am not sure myself what the proper way to do that is with your configuration. I am sure someone else has experience with this configuration that can help out here.
I am not sure that the encoder that you are trying to use is a good match for your stepper anyway. It has 2400 pulses per inch where you are using 2000 pulses per inch on the stepper. I would not expect that combination to work out very well. I would want the encoder counts to be evenly divided by the step counts.
I think you can fix your original issue without the encoder. I think your main issue for the original problem is that you are just missing steps due to too much speed and or too much acceleration. Try reducing the max velocity for the z axis to 1/2 what it is now. Do the same for the acceleration. Test the system again. If the issue goes away don't worry about the encoder. You could then try to increase the speed slightly and test again.
If you are missing steps while you are moving due to too much speed then it is only going to try to speed up the motor even more causing more missed steps and ultimately giving a following error. The encoder won't make the stepper work any better it will just tell you when it is not working as well as you want it to.
I am not sure that the encoder that you are trying to use is a good match for your stepper anyway. It has 2400 pulses per inch where you are using 2000 pulses per inch on the stepper. I would not expect that combination to work out very well. I would want the encoder counts to be evenly divided by the step counts.
I think you can fix your original issue without the encoder. I think your main issue for the original problem is that you are just missing steps due to too much speed and or too much acceleration. Try reducing the max velocity for the z axis to 1/2 what it is now. Do the same for the acceleration. Test the system again. If the issue goes away don't worry about the encoder. You could then try to increase the speed slightly and test again.
If you are missing steps while you are moving due to too much speed then it is only going to try to speed up the motor even more causing more missed steps and ultimately giving a following error. The encoder won't make the stepper work any better it will just tell you when it is not working as well as you want it to.
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
24 Sep 2015 04:54 #62911
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
I tried cutting down the acceleration once and it didn't seem top help. Ill try again. I figured if I was pushing it too hard it wild drift down losing steps moving up due to the extra load moving the spindle up. The cuts I'm making are only. 015 deep with a. 04 tip cutter.
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
- Offline
- Platinum Member
Less
More
- Posts: 320
- Thank you received: 48
24 Sep 2015 05:00 #62912
by LearningLinuxCNC
Replied by LearningLinuxCNC on topic 5i25 - Using Encoder on Axis
Yes, I agree the fact that it is losing steps in the downward direction only is quite unusual.
Note that your max velocity for the Z axis is higher than that for the X and Y axis. The max linear velocity should still govern but you may wan to look there also.
If you tried reducing acceleration try reducing velocity.
Note that your max velocity for the Z axis is higher than that for the X and Y axis. The max linear velocity should still govern but you may wan to look there also.
If you tried reducing acceleration try reducing velocity.
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
24 Sep 2015 05:14 #62913
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
Ill try that. I don't think it ever gets going faster than 40ipm if tsar. Its only moving about .035 up and down
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
24 Sep 2015 11:16 #62933
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
I lowered both accel and velocity to 1 in the config file, a crawl, and still the same result. I used the encoder position feedback to track it and as before it is still drifting up. I believe i have a gremlin...
I guess if it will help in any way i'll give more specs of the axis.
Gecko 213v
Nema 34 640oz.in. stepper
~50v linear power supply
And obviously linuxcnc(2.7), mesa 5i25, mesa 7i76
I guess if it will help in any way i'll give more specs of the axis.
Gecko 213v
Nema 34 640oz.in. stepper
~50v linear power supply
And obviously linuxcnc(2.7), mesa 5i25, mesa 7i76
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
24 Sep 2015 11:55 #62934
by PCW
Replied by PCW on topic 5i25 - Using Encoder on Axis
Cumulative errors can sometimes be caused by wrong step width (too narrow) or polarity
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
25 Sep 2015 03:37 #62957
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
By polarity are you referring to the stepper motor polarity (A+ A- B+ B-)? I will try increasing the step width.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
25 Sep 2015 07:52 #62964
by PCW
Replied by PCW on topic 5i25 - Using Encoder on Axis
By polarity I meant the step pulse polarity.
If this is incorrect the pulse width and setup/hold times will be wrong
If not inverted in HAL, the 7I76s STEP+ outputs are active high
If this is incorrect the pulse width and setup/hold times will be wrong
If not inverted in HAL, the 7I76s STEP+ outputs are active high
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
25 Sep 2015 11:24 - 30 Sep 2015 08:09 #62966
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
They are not inverted so should be active high, which i believe is correct for G213V (remembered having G203V's but looked today, they are 213's). Pulse settings were used as G203V from the pncconf wizzard which i assume 203 and 213 would use the same settings, can't find data to verify this.
Things i've tried.
Lowering accel/velocity
Changed computers (3 times)
Changed linuxcnc version (2.6 to 2.7)
Tried different microsteps
After messing with it a little bit more today the results were not really conclusive but it does seem that it only misses steps when running code generated that has lots of very small movements across more than one axis (in this case i'm trying to engrave a half tone image with a .1mm engraving bit so the depth sometimes is even less than one step, another time this has shown was with a 2.5D carving, also having a lot of very small movements) . To test this i made some code that just ran the Z up and down. These were done with the accel at 30 in the config file. First i ran -.15 back to 0 over 1000 lines and encoder showed no loss, then -.015 and finally i went to .0025 which is only two steps at half stepping. It was very very rapid directional change and encoder count still came back correct. Now when i run code that has many random small movements along with other axis movements thats when things go stupid.. I need to make a Z only code that makes random movements up and down and see what that does so at this point i still haven't got it down to a science. Only problem is once i find out what conditions the problem shows itself, how am i gonna find the cause? lol..
Things i've tried.
Lowering accel/velocity
Changed computers (3 times)
Changed linuxcnc version (2.6 to 2.7)
Tried different microsteps
After messing with it a little bit more today the results were not really conclusive but it does seem that it only misses steps when running code generated that has lots of very small movements across more than one axis (in this case i'm trying to engrave a half tone image with a .1mm engraving bit so the depth sometimes is even less than one step, another time this has shown was with a 2.5D carving, also having a lot of very small movements) . To test this i made some code that just ran the Z up and down. These were done with the accel at 30 in the config file. First i ran -.15 back to 0 over 1000 lines and encoder showed no loss, then -.015 and finally i went to .0025 which is only two steps at half stepping. It was very very rapid directional change and encoder count still came back correct. Now when i run code that has many random small movements along with other axis movements thats when things go stupid.. I need to make a Z only code that makes random movements up and down and see what that does so at this point i still haven't got it down to a science. Only problem is once i find out what conditions the problem shows itself, how am i gonna find the cause? lol..
Last edit: 30 Sep 2015 08:09 by jds8086.
Please Log in or Create an account to join the conversation.
- jds8086
- Offline
- Junior Member
Less
More
- Posts: 31
- Thank you received: 0
30 Sep 2015 08:24 #63235
by jds8086
Replied by jds8086 on topic 5i25 - Using Encoder on Axis
SUCCESS!!!, or at least found a work around.
After much thought and trying this and that i think i found a work around for the missing steps on these very small movements. I changed my step scale and encoder scale to simulate having a 10:1 gearhead on the stepper, and i'm not having any missing steps now. I edited my ini to send the encoders position into "axis" so its using actual position instead of feedback from stepgen. Using the old settings (1:1) and a MIN-FERROR of a high .01 it errors out within a couple of minutes with a following error. Using the 10:1 scales and setting MIN-FERROR down to .001 and it runs the whole code without a following error. So guess who ordered a 10:1 gearhead.. I know i'm going to sacrifice a little bit of acceleration and a lot of feedrate but at least it will not drift. From what i can tell i will be able to get about 100in/min with the steppers i have.
After much thought and trying this and that i think i found a work around for the missing steps on these very small movements. I changed my step scale and encoder scale to simulate having a 10:1 gearhead on the stepper, and i'm not having any missing steps now. I edited my ini to send the encoders position into "axis" so its using actual position instead of feedback from stepgen. Using the old settings (1:1) and a MIN-FERROR of a high .01 it errors out within a couple of minutes with a following error. Using the 10:1 scales and setting MIN-FERROR down to .001 and it runs the whole code without a following error. So guess who ordered a 10:1 gearhead.. I know i'm going to sacrifice a little bit of acceleration and a lot of feedrate but at least it will not drift. From what i can tell i will be able to get about 100in/min with the steppers i have.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.068 seconds