Child modules are those that have been declared in another module's declaration section and must also be defined. In the parent module, after all parameters, variables and states have been declared, each child module must be defined by opening an angle bracket, specifying the name of the module to define, defining the module (including its parameters, variables and states), and specifying a closing angle bracket. For example:
<
{==================== System\MonitorPump =======================}
{ This monitors the main pump of the system }
{===============================================================}
MonitorPump
(
pumpAmps { First parameter };
)
[
maxPumpAmps = 12 { Local variable with default value };
RunPump Module { Child module };
]
Main [
RunPump() { Pump remains running while state is active };
If pumpAmps > maxPumpAmps Fault
{ Change states if amperage is too high };
]
Fault [
If pumpAmps <= pumpMaximumAmps Main;
]
<
{================ System\MonitorPump\RunPump ===================}
{ This starts up the main pump of the system }
{===============================================================}
RunPump
..
{***** The RunPump module would be defined here *****}
..
{ End of System\MonitorPump\RunPump }
>
{ End of System\MonitorPump }
>
This shows all the components of a module together.