Slavko Kocjancic wrote: > Hello.... > > I'm use EMC with 25uS base period. This came little coarse now as I get > stronger motors for my machine. So I look under the hood of emc how > works. Now I get confused how all thing works. > > If I understand correctly the stepgen (in base period) just make pulse > if needed but all the accelerations/deceleration are calculated in servo > period thread. Is that true?!? > > If it's true then acceleration isn't smoth as we think. Assume Servo > thread at 1ms and base thread at 25us. > Let's assume we accelerate from 0 to 10000 step's /second > > When step rate is under 1000 the every step can have different length > and over 1000 steps the more steps in series have same length not > accelerating lineary. Near the end the motor got 10 steps at same length > and next 10 steps at little shorter time. > > San someone verify that this is true? And how that affect performance? > (acceleration curve not straight line but staircase one) > Sure, if you have the BASE_PERIOD set for 25 us, and your maximum step rate is 10,000 steps/second, then that is 4 base periods. The next step down in speed is 5 base periods. There is no way, given how stepgen works, to produce steps at any rate between every 125 us and 100 us. So, to produce a rate of, say, 9000 steps/second, it has to hop back and forth between 100 and 125 us periods between steps. It is not very easy for larger motors to follow these large fluctuations in step timing. > Is mesa and pluto board done in same way? > I can't answer for those boards, but my Universal Stepper Controller (USC)works in a fairly similar fashion. But, instead of the BASE_THREAD being 25 us, the "clock" is 100 ns, or 250 times finer timing granularity. So, instead of a 25 us jump in step timing out of 100 us, or 25% variation, it would have a 100 ns granularity out of 100 us, or 1 part per thousand.
You can't do this with a microcontroller, as they are sequential processors, and might have to be shared between axes. Typical microcontrollers just won't be much faster than a Pentium-class CPU, even if dedicated. The USC board I make has completely separate hardware for each axis, and all the counters are running at 10 MHz (100 ns per count). And, yes, with the USC, you do not use a base thread at all, just a servo thread. Vastly lighter load on the CPU. A 600 MHz Pentium III is perfectly adequate. Jon ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers