What you want to do is perform a topological sort (man tsort) on the graph.
It should be simple enough to write a tool to do that. Ken On 12/14/2013 12:18 PM, Gene Heskett wrote: > On Saturday 14 December 2013 11:38:26 Marius Alksnys did opine: > >> Thanks, I will try it. >> This is something what I was thinking about and even tried to swap pid >> and offset addf lines, but I never found importance of addf order in >> documentation, which would be worth noting there.. > It is important. In both threads. > > General rule of thumb in base thread, > addf anything that needs a sample from hdwe (encoder?) > addf in order, the chain of non-fp stuff the sample flows through > addf last (for steppers) the parport.N functions > > General rule of thumb for servo thread speed stuff: > addf signal receiver FP stuff (such as an encoder) > addf the module its "net" output goes to > addf next module the "net" of the above goes to > addf continue till this function is completed > > That way any changes in the signal are propagated thru the processing chain > in a single servo cycle. And when the actual control outputs are updated, > they are working with the most up to date data they can get. > > There are times I expect when you may have another function chain that > needs to be interleaved with the above, but I haven't run across a case > where I could test and get a demonstratable advantage. YMMV of course. > Spindle control servos, based on an encoders velocity, will get very > unstable if the path is backwards thru the addf's because this severely > restricts the bandwidth of the control. Even with what I THINK is all the > ducks in a row, I found that double the speed of the servo thread from 1 > millisecond to .5 milliseconds was a huge improvement. Because of non- > linearity in the pwmgen and controller, I have a linear module between the > PID.out and the PWMGEN.in, additional time delay, but it sure tames the > PID.error range. Decent load torque at creep speeds (50 rpms) without > hunting at 75% speeds (1200 on up) where its very sensitive. > > In retrospect, and I'd have to make additional room for it now, I know I > would have been schmardter to have used the PMDX-106 (or whatever is being > sold for that now) in place of the cheaper, too darned cheap and slow & > needs modification to raise its control bandwidth if its anywhere in a > feedback chain, CNC4PC C41 for that translation function. Dumb, but its > done. I won't make that mistake again, it, out of the bag, is simply not > suitable for use in a servo controlled environment. You have been > warned... > >> On 2013.12.14 13:12, andy pugh wrote: >>> On 14 December 2013 08:08, Marius Alksnys <marius.alks...@gmail.com> > wrote: >>>> I tried simple configuration (without offset component) too. And it >>>> worked perfectly. >>> If it goes wrong with the offset component but works without it, then >>> I suspect that the problem is with the execution order of the motion >>> controller and the offset component. >>> If you change the sequence of the "addf" statements in the HAL then >>> you can probably make it work. >> ------------------------------------------------------------------------ >> ------ Rapidly troubleshoot problems before they affect your business. >> Most IT organizations don't have a clear picture of how application >> performance affects their revenue. With AppDynamics, you get 100% >> visibility into your Java,.NET, & PHP application. Start your 15-day >> FREE TRIAL of AppDynamics Pro! >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.cl >> ktrk _______________________________________________ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users > > Cheers, Gene ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users