Re: [Emc-developers] jog wheel problem

2017-03-31 Thread John Kasunich
try changing line 38 from: out = (int)(rtapi_s64)(value * scale); to out = (int)(rtapi_s64)((value * scale)+0.5); This looks like a case where the floating point 'value' might be 3.999, but the conversion to integer results in 3 Adding 0.5 makes it round to the nearest integer.

Re: [Emc-developers] jog wheel problem

2017-03-31 Thread Stuart Stevenson
Gentlemen, Having the problem on 4 mpg's (three single and on diff) I am relatively sure the problem isn't hardware. Halshow (watch) shows the encoder counts accurate and ilowpass counts are incorrect I suspect ilowpass. ilowpass is so simple it is almost impossible to see how it could be

Re: [Emc-developers] jog wheel problem

2017-03-31 Thread Gene Heskett
On Friday 31 March 2017 11:32:53 Kenneth Lerman wrote: > Up the thread a ways, Gene commented that the MPG generates one count > per detent. > It does not, the encoder scale is set to 4, so at the encoder out, one "click" is 4, but later I mult2 that by .250, and this is what is fed to

Re: [Emc-developers] jog wheel problem

2017-03-31 Thread Kenneth Lerman
Up the thread a ways, Gene commented that the MPG generates one count per detent. I thought that the encoder in the MPG generates one *cycle* per detent. A cycle is represents four quadrature edges which means that you get four counts per cycle. So that's four counts per detent. There is a