> On 23. Mar 2018, at 14:41, John Kasunich <[email protected]> wrote:
> 
>> its CPU cycles. 
>> http://linuxcnc.org/docs/2.5/html/hal/basic_hal.html#_hal_components
>> I think that should be changed to some unit of time.
>> 
> 
> Changing to time units may be non-trivial.  We found a long time ago 
> (mid-2000's) that the calls to convert from CPU clocks to nano-seconds were 
> ridiculously slow.  In many cases, it was taking 10 times longer to compute 
> the duration of a HAL function than it took to execute the function itself.  
> And since those HAL pins must be updated for every function call, we just 
> couldn't afford the overhead.

we have exactly the same problem in the stmbl hal implementation.
the way we solved this, is to do all the internal calculation in ticks, and and 
only convert to time when the user reads them.
the downside is, they cant be pins, and that cant be converted in realtime. but 
there is no need. We used to have pins for the time, like in linuxcnc,
now there is a command that displays the last, average and maximum time for 
each function.

Rene
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to