That is where I'm at right now. My base thread is limited because the feedback from hostmot2 only changes at servo rate, and it only updates the pwmgen at servo rate as well.
So computing the output value of the pwmgen at the base thread speed is a waster of effort.. If I could read and write hostmot2 faster it would work, but it appears it is not designed to do so. The hostmot2 read and write time's are short enough to work with a base thread of 50 us, but there must be something in there that is assuming the servo period is 1000 us. On Tue, Feb 7, 2017 at 3:44 PM, andy pugh <[email protected]> wrote: > On 7 February 2017 at 18:28, Curtis Dutton <[email protected]> wrote: > > As part of my laser engraver implementation that I have been working on, > I > > have a raster component that needs to vary the pwmgen output at higher > rate > > than the servo period. > > I don't think you can vary the pwm duty cycle any faster than the > servo thread rate. > The duty cycle calculations are performed in a floating point thread, > the base-thread function runs at a constant PWM rate between > duty-cycle updates. > > It is actually possible to run floating-point base-threads, but then > you will find that the component that determines the duty cycle would > also have to run in that faster thread. > > Maybe you could run three threads? > > -- > atp > "A motorcycle is a bicycle with a pandemonium attachment and is > designed for the especial use of mechanical geniuses, daredevils and > lunatics." > — George Fitch, Atlanta Constitution Newspaper, 1916 > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
