> On 11.04.16 14:52, Nicklas Karlsson wrote: > > Diluted old values may better or worse. Problem is I can't get a grip > > on howto calculate moving average arrival time within the period. > > That's one of the two methods presented, isn't it? > > > Until this is solved I calculate number of periods and where phase is > > located within period in average for all values each time. It will > > work to calculate by using each value every time even though it use a > > ridiculous amount of clock cycles. > > That's just a hardware counter ticking away between arrival times, reset > after reading, isn't it? The elapsed time is the sample value, IIUC. > (Why do I feel there's something I'm missing here?) > > Erik
Ordinary moving averag is not a problem but I did not get the grip on the phase. Actually period average should be good enough for now. With a 20 byte receive fifo running at half full jitter and real time behaviour should not be a problem. I modified Mesa Hostmot2 ethernet protocol to send position instead of velocity. Interestingly enough there seems to some kind of rounding error of one pulse. Accumulator and displayed position does not agree for negative values. Then starting from zero and stepping 0.100 in positive direction it only move 0.099 but it may be fixed by make a continuous move and the next time step is perfect. Scaling is 1000 so it should be a perfect fit with the display. Nicklas Karlsson ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users