On Mon, May 25, 2009 at 12:32:44AM +0100, Leslie Newell wrote:
> How do you specify which thread it is on?

this is specified on the halcmd 'addf' line for the function and shown
by halcmd 'show thread'.

> Is HAL event driven or a state machine? For instance if I change a pin 
> that is connected to other modules, do those modules get notified 
> immediately or does the change get processed on the next cycle?

Realtime components are invoked in a specified order (the one shown by
halcmd show thread) at the specified interval (also shown by halcmd
show thread).  If the execution order is first A then B, the B function
will see the outputs updated by A.  The next time A is invoked (e.g.,
after 25us has passed if it's in a BASE_PERIOD of 25000) it will see the
outputs updated by B.

When functions in two different realtime threads, or some non-realtime
code is involved, then the ordering guarantee is only that they are not
re-ordered with respect to each other.

The model of hal is discussed extensively in the first chapter of the HAL 
manual,
http://www.linuxcnc.org/docs/2.3/HAL_User_Manual.pdf

Jeff

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to