(ongoing...)
In III, the principle of an archirecture has been explained in comparision with the architecture of a house :
An example of what could be an architecture for a Simulink model has been shown :
In steps 5, 5a and 5b, we will explain how to design an architecture for a Simulink model.
As said in step 3, the architecture only defines rooms and paths connecting them.
As a result, for MecaTroniX tool an architecture is simply a Simulink model basically made of SubSystems defining the rooms and lines defining the paths.
We will illustrate through different examples of architectures. First of all, there is a specific view for architectures :
An architecture is a Simulink model : any architecture can be open by selecting it and press Open :
As explained in previous steps, an architecture defines rooms receiving modules and paths between rooms.
For example, for archi_training_vU12 at the first level :
As we can see, paths are simply lines between Simulink SubSystems.
A room is a Simulink SubSystem specifically named by a prefix like mon_, obeying these rules :
a prefix is composed of characters from a to z, A to Z and digit from 0 to 9
character _ must be the last character
it can not start with a digit
its length excluding the last character _ must not exceed 15
it must not start with these reserved words : ext, abl, archi
Inside a room, there is only inport and outport, for example for the mon_ room :
There can be as many inports as wanted, including 0.
There can be 0 or 1 outport : on the principle, all signals computed in a room are transmitted through this outport if there is one.
As we can see, two others Simulink SubSystem MEASUREMENTS and CONTROL are not rooms, because they are not named as a prefix.
These SubSystems are in fact a floor aiming to make the architecture more readable. For example for MEASUREMENTS :
As we can see, there are the two rooms can_ and ana_.
Inside a floor, bus can be created at will, thanks to BusCreator.
In this example, the architect wanted room mon_ fed with ana_ and can_ results without raw signals coming from the outside.
For floor CONTROL :
there are two rooms targets_ and FB_.
Room FB_ is made of 3 inports and 1 outport :
Once a Simulink model has been designed as an architecture, it can be used for an auto assembly as explained in step 3.
But before, its validity must be checked. This is the role of the Valid? button available when one architecture is selected :
Then, a rank 2 GUI opens saying wether or not the architecture is valid, if it is the case, message is :
To be declared as valid, there are several conditions. If one of them is not fulfilled, the architecture is declared as invalid, and the rank 2 GUI explains why, for example :
Next step 5a lists the conditions of validity and illustrate them through invalid and valid architectures.
Remark, by default, 4 architectures are installed :
archi_empty_vU0 : this is an empty architecture with only one inport and one outport.
archi_empty_wo_io_vU0 : this is an empty architecture without inports/outports
archi_std_control_vU0 : this is the classical structure of a control law u=f(xhat)
archi_training_vU12 : coming from step 3b