Component Execution Order

More
15 Mar 2017 19:49 #89684 by islander261
Hello

Sorry if this has been covered many times before, I couldn't find a complete explanation.

It is my understanding from reading other threads is that the order HAL components are executed is the same order they are called in the HAL file(s). So my questions are:

Is this the order the component is loaded with the loadrt command or when the component is instantiated with the addf command?

When a configuration has multiple HAL files (my extra tabs in GMOCCAPY) or other files called out in the base .INI file what order are the HAL files components executed? To expand on this what effect does this have on signal and pin visibility across multiple HAL files?

Is it bad form to use components such that order of execution may matter?

TIA

John
More
15 Mar 2017 22:18 #89694 by PCW
Real time component functions are executed in the addf order
and order is critical for some functions.

Not sure about additional hal file section order but I dont think its common to
have real time functions in extension hal file sections
More
16 Mar 2017 18:59 #89766 by andypugh

islander261 wrote: Is this the order the component is loaded with the loadrt command or when the component is instantiated with the addf command?


They are executed in "add" order.

If you are using multiple HAL files and this is a problem, then the "addf" command can take an optional numerical argument to specify the place in the execution list.

This does not seem to be documented anywhere, except the halcmd built-in help.:

halrun
help addf
Time to create page: 0.110 seconds
Powered by Kunena Forum