On 03/29/2017 11:22 AM, Stuart Stevenson wrote: > further developments > > testing with single and differential mpg yielded similar but slightly > different results > > halshow revealed ilowpass losing random counts between in and out > > removal of ilowpass yielded much better results but still not perfect VERY interesting. I use ilowpass here, as the servos make nasty buzzing noises if I don't. And, I frequently count off clicks on the MPG, and have never noticed it losing counts. I do have to hold the jog enable button until the last MPG click has been dribbled out to the axis, or I would lose some counts on the last click. That takes less than a second.
Now, I am using ilowpass on a 2.6 install, possibly something has changed. Also, check that you have ilowpass addf'ed to the right thread. It ought to be running on servo-thread. You can compare your hal code to this : http://pico-systems.com/codes/jebport/pendant.hal As for the single vs. differential, you could watch ppmc.0.encoder.xx.count and ilowpass.0.out with halscope or halmeter. After movement stops, these numbers SHOULD be identical. If they aren't, that sure indicates where the problem is. If they ARE identical, then crank the MPG some exact number of turns at different speeds, and see if the encoder is not producing as many counts as expected. If the A and B outputs of the encoder have crosstalk (Seen a LOT of this when driving long cables) it can screw up the digital filtering of the encoder counter. So, say, A and B are both high and the encoder makes a transition to A low, crosstalk on the cable can cause B to momentarily pulse low. That is an illegal quadrature state transition (only one line is supposed to change at a time). The encoder counter is supposed to reject such transitions and wait for a valid one. But, if it happens a lot, like at EVERY count, the filtering can fail. Pull-up resistors might help in this case by establishing better resting logic levels from the encoder. Jon ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers