Sebastian Kuzminsky wrote:
> Jon Elson wrote:
>> Sebastian Kuzminsky wrote:
>>> If I disable the steppers on the 7i43 (with config="num_steppers=0") and 
>>> run it with 4 servo channels (and 24 accessible GPIOs), I get these figures:
>>>
>>>      read time=191, tmax=203
>>>      write time=190, tmax=239
>>>
>>> That's about 1 KHz.
>>>
>> Very interesting!  I wonder if you can improve this by 
>> streamlining the driver.  I can do 4 axes on my USC or UPC board 
>> at about 100 us, on a 600 MHz Pentium II through the motherboard 
>> parallel port.  A safe 5 KHz.
> 
> Yeah something's not right there, 190 us is way too long.
> 
> 
> Hm, these numbers come from 'halcmd show param hm2_7i43.*.time', which I 
> thought was in nanoseconds, but looking at hal_lib.c I see that it's in 
> CPU clock cycles.  Is that intentional?

Yes - it was changed at rev 1.31 of hal_lib.c.  We found that the RTAI 
function invoked by "rtapi_get_time" was incredibly slow - in some cases 
it was taking several times longer to run than the code that it was timing.

> 
> In hal_lib.c's thread_task(), it calls rtapi_get_clocks() instead of 
> rtapi_get_time().
> 
> <http://cvs.linuxcnc.org/cvs/emc2/src/hal/hal_lib.c?rev=1.59>
>

Unfortunately, conversion from clocks to time is non-trivial, so we 
simply report the results in clocks.  The situation is getting worse, 
not better.  In the name of "progress", we now have to deal with CPUs 
that change their clock frequencies on the fly.  I've even heard a 
report that on some modern CPUs, the TSC can no longer even be counted 
on to be monotonic.

Regards,

John Kasunich

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to