My question is about what happens to the "leftovers" when the precision of the g code commanded position cannot be met by the hardware executing it. Several years ago I wrote a program to "generate" involute gear teeth by making multiple cuts of the same tooth from differing angles with a rack shaped cutter. This eliminates the need for the different cutters when making only one cut per tooth. I have used it many times to cut relatively large gears with a relatively small number of teeth with virtually no noticeable error.
A few days ago a friend who repairs watches wanted to know if I could figure out what gear (wheel to you watch guys) size, pitch or module and number of teeth would be required to replace a missing one. (the original was long gone). I had no problem working from the center distance and the matching pinion coming up with the appropriate design. However, when I cut the gear I had the right number of teeth but the last tooth was much too wide. It would appear that I had lost a bunch of steps on the rotary axis. Further investigation reveals what I think is the root cause but I would like someone with more knowledge than me to confirm or disprove my analysis. The gear had 86 teeth (in the power train, not in the timing train) and I made 9 cuts per tooth. That is 774 commands and about all but 86 of them in the same direction. My rotary axis is a 200 step stepper into a 30 to 1 worm drive microstepped by 10 so 1.8 degrees divided by 300 equals .006 degrees per microstep or 166.6667 steps per degree. Unfortunately when the g code calls for a 1 degree move the motion planner can only issue 166 steps since it can't issue .6667 steps. That means that the actual movement of the A axis is only 166/166.66667 or .996 degree. That is .004 degree lost as far as I can tell. That might be close enough for one or even several commands but after 688 comands in the same direction that constitutes 688 x .004 or 2.7 degrees lost. That is a significant portion of a tooth on a high tooth number wheel. Depending on the actual value of the command the actual lost motion could be anything from nothing to essentially a whole step or .0059999 degrees. I think that I can lessen the impact of the lost portion of the steps by using the MOD operator to determine how much is left over after dividing the commanded move by .006. Then use IF ELSE, IF the remainder is Greater Than .5 steps then ADD a full step (command = command PLUS .006 degrees) ELSE issue the commanded number (do nothing). This should statistically reduce the error by rounding up or down and redistribute it randomly among all the cuts although it will not eliminate it. The greater the number of cuts the better the approximation will be. Sorry for the long post but I couldn't condense it much and get the idea across. Can anyone confirm or disprove my observation or come up with a better solution? Obviously I could add another reduction stage to my rotary axis but I would like to avoid that if possible. Cecil ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users