(ongoing...)
This step in video : https://youtu.be/QFdwEMUy2zs (it might be more convenient to copy/paste this link in your usual internet explorer).
Previous step explained the composition of a module :
a library
a calibration script
This steps deals with the execution a module.
A module is first of all a SubSystem. As a result, a module is executed like any SubSystem in Simulink.
Basically, there are two situations :
with a port trigger
without a port trigger
When created, a module can have a port trigger or not according to the option defaultTrigger.
If this option is set to 1, the module looks like :
Moreover, if the module is created while option defaultMask is set to 1, the parameter St is then available through the mask :
This St parameter is managed by MTX : during an auto-assemby (see step 1, 2, 3), the port trigger is connected to a function-call generator according to the requested value, for example with 0.01 :
As a result, user can use St variable inside the module for calculus.
A module may not have a trigger port, in that case, it looks like :
In that case, MTX does not manage execution of the module. It is potentially defined by the user in the library through the Sample time parameter of the subsystem :
This Sample time can be -1 :
Use of a trigger port managed by MTX bring some advantages :
execution time of a module is explicitaly known : see assembly step 1a
Simulink code of a module can use St variable
MTX functionning is also faster
Next step 0b deals with the calibration of a module.