On Mon, 2017-04-10 at 10:05 -0600, Sebastian Kuzminsky wrote: > On 04/10/2017 09:45 AM, Valerio Bellizzomi wrote: > > On Mon, 2017-04-10 at 16:30 +0100, andy pugh wrote: > >> On 10 April 2017 at 15:52, Valerio Bellizzomi <vale...@selnet.org> wrote: > >>> Running the servo jitter test program shows a value of around 6000-7000, > >>> but the default is 1000000 ! > >> > >> That's because a 1mS servo thread is about right for most machines. > >> Just about the only time that you would need to go faster in the base > >> thread is if you are doing brushless motor commutation in software. > >> > > > > Yes the latency-test, it shows a figure of around 6000-7000 but when I > > use that in the config, linuxcnc doesn't start, and the dmesg shows a > > consistent number of messages related to a cpu being stuck > > The jitter that latency-test determines is *not* the number you should > use for your servo-thread period. > > Jitter is the error in scheduling time: the difference between when the > thread asked to be woken up, and when it actually was woken up. > > The servo-thread period is *how often* the servo thread wants to be > woken up, to perform the next increment of controlling the machine. > > Jitter is usually on the order of a few microseconds to a few tens of > microseconds, and is determined by your hardware. The servo-thread > period is usually one millisecond, but sometimes in special > circumstances a few times less than that, and is chosen by the machine > integrator (the person building and configuring the machine). > > So if pncconf suggested a 1 ms servo-thread period, it did the right thing. > > If you try to run with a servo-thread period of 7,000 nanoseconds you'll > have a bad time, because the servo thread generally takes longer than > that to run. So the servo-thread will be unhappy because it doesn't get > to run as often as you told it to, and the rest of the system will be > unhappy because there won't be any time for anything *other* than the > servo-thread. > > It's that "no time for anything else" part that caused the hang when you > start LinuxCNC. > > You can see how long the servo-thread takes to do its job by starting > LinuxCNC, then running (in a terminal window): halcmd show thread > > The "Max-Time" is the longest the servo-thread has taken to run (so far, > it might be more in the future, depending on what it's doing). If you > have a servo-thread period that's shorter than that max-time things > aren't going to work well, and if the period is *close* to the thread's > max-time there won't be much CPU left over for doing other things (like > running your GUI and the rest of your Linux system). > >
Humm apparently I have confused figures, that's probably because there is a button "run the latency test" next to the servo value in pncconf ------------------------------------------------------------------------------ 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 Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users