Advice for Capella beginner

Hello everyone, I am new to Arcadia method and after some reading and small example, I have some questions.
My system has been mainly design on simulink and now for better understanding and stuff, i’m trying to use Capella.
My main question is regarding all the stateflow I have created in simulink. Is it relevant to add them? From my understanding the modes and states isn’t appropriate?
Or could I just create a lot of subfunction as showed in the picture in my SDFB diagram for example? I have never seen example that content a lot of subfunction and I am wondering if this is a good idea ?
thanks so much !

Hello Thibaud,
it depends on the use of stateflow in your engineering, including your Simulink model. what do these state machines describe ?
I could first imagine that they govern the way the system evolves according to user actions and environment evolutions. If so, you can use modes & states, that can be associated to either the system or components; each mode or state governs or requires availability of some functions, and mode or state transitions are triggered by functional exchanges.
Alternatively, I could also suppose that in fact, each state machine describes the behavior of a function. In this case, modes and states in Arcadia are not appropriate as is, due to their definition and integration with other Arcadia concepts, as explained above.
If so, the function is expected to realize a set of “actions”, each described in Simulink by a state, only one at a time, with transitions to move to another one, etc.
In this case, I would suggest, if possible, not to try to describe the state machine in the function in Capella, because the functions/exchanges are not designed and adapted for that.
Try to keep your machine in Simulink, keep a similar architecture in Capella and in Simulink, and link both so as to easily navigate from the function to the state machine that describes it.
Maybe you have another use, so don’t hesitate to elaborate and complement or react.

Merci de votre réponse rapide.
Les machines d’états utilisées dans Simulink détaillent en effet comment agissent plus précisément les fonctions de mon système. Par exemple, les différentes étapes dans mon “gestionnaire de commande” afin de valider ou refuser une commande reçue par le système. L’idée d’avoir toute l’architecture disponible sur Capella aurait été un plus.
J’ai remarqué que lorsque j’arrivais à l’architecture logique, je ne pouvais pas réalisé des blocs de sous fonctions. Ainsi, cela aurait-il du sens de réaliser plusieurs SDFB décrivant plus précisemment le fonctionnement de certaines grosse fonction puis y faire référénce depuis le LAB / PAB ?

Il est bien sûr possible d’utiliser des sous-fonctions, simplement il faut prendre garde, si possible, aux éléments suivants :

  • si vous vous contentez de créer une sous-fonction par état d’une machine stateflow, rien n’indique qu’une seule fonction peut être active à un instant donné; de plus, un échange entre deux fonctions n’est pas un ordre de séquence entre elles, mais simplement une dépendance fonctionnelle (la fonction destinataire a besoin d’une donnée portée par l’échange, la fonction source est susceptible de la lui fournir).
  • si vous voulez décrire un déroulement temporel (succession de fonctions non forcément liée à un échange), un scénario peut être approprié. Mais ce n’est pas du même ordre qu’une machine d’états.
  • pour assurer la cohérence des entrées/sorties de la fonction mère avec son comportement, il faudrait que les échanges avec les fonctions externes soient portés par les sous-fonctions (la règle dans Arcadia et Capella est qu’en fin de modélisation, seules les fonctions feuilles portent des échanges).

English please
Automatic translation below:

Thank you for your quick answer.
The state machines used in Simulink detail how the functions of my system work more precisely. For example, the different steps in my “order manager” to validate or refuse an order received by the system. The idea of having all the architecture available on Capella would have been a plus.
I noticed that when I got to the logical architecture, I couldn’t make sub-function blocks. Thus, it would make sense to carry out several SDFBs describing more precisely the functioning of certain large functions and then refer to them from the LAB / PAB?

It is of course possible to use sub-functions, simply take care, if possible, of the following elements:

  • if you simply create a sub-function per state of a stateflow machine, there is no indication that only one function can be active at a given time; moreover, an exchange between two functions is not a sequence order between them, but simply a functional dependency (the recipient function needs a data carried by the exchange, the source function is likely to provide it).
  • if you want to describe a temporal sequence (succession of functions not necessarily linked to an exchange), a scenario may be appropriate. But it is not of the same order as a state machine.
  • to ensure the consistency of the parent function’s inputs/outputs with its behaviour, exchanges with external functions should be carried by the sub-functions (the rule in Arcadia and Capella is that at the end of modelling, only the leaf functions carry exchanges).
    Translated with

Merci, j’y vois plus clair. Pour la pluspart de mes cas, ça ne posera ainsi pas de problème.
Toutefois, comme sur le SDFB en photo qui représente une machine d’état où des commandes sont gérées (une à la fois), je ne vois pas comment faire pour représenter cela tout en respectant les échanges de fonctions feuilles tout en conservant une bonne compréhension. C’est pourquoi, j’avais pour idée de lier ce SDFB à une fonction du SAB/ LAB / PAB où en y faisant référence? Peut être que la solution est de laisser ce genre de machines d’état sur Simulink comme vous me l’avez spécifié au début?
Qu’en pensez-vous? Merci encore pour votre aide !
In English :
Thank you, I see it more clearly. For most of my cases, it will not be a problem.
However, as on the SDFB photo that represents a state machine where commands are managed (one at a time), I do not see how to do this while respecting the exchanges of functions leaves while maintaining a good understanding . That is why I had the idea of linking this SDFB to a function of the SAB / LAB / PAB where referring to it? Maybe the solution is to leave this kind of state machines on Simulink as you specified at the beginning?
What do you think? Thank you again for your help !

I agree with you that this kind of diagram is hardly understandable, and therefore probably of little value.
To give a simple decision criterion, you should put in your Arcadia model what is necessary for you to define and justify your architecture, and only this.
So if your state machine has no impact on the functional definition (other functions, dataflow, exchanged data), then you could consider it as just a description of what is expected about the function (a kind of requirement on the function); in this case, you can define it in Simulink/stateflow, and just refer to it by any means (link…), or even simply include a screendump of it in your function description field in Capella, for documentation generation purpose. This looks better to me as compared to building a “fake” dataflow diagram which would not be connected to the rest of the model.
On the other side, if this state machine (and the function to which it relates) orchestrates the behavior of the dataflow, then the function looks like in charge of “supervision” of the system (or of a component); in this case, you need to define the dependencies between your state machine and other functions (those available in each mode or state) and with functional exchanges (those triggering the transitions in your state machine). So define a state machine (modes or states) in Capella, link it to the system or to the component, and to the dataflow as mentioned.

Thank’s it’s making sense. I will go deeper by using Modes & States as you suggest. By the way, I have watched a very interesting video ([Webinar] Modeling states and modes with Arcadia and Capella: method and tool perspectives) about configuration based and these states machines and stuff. I am using Capella 1.2.1 right now, is this available in a more recent version or as an addon ?
Thank’s again for all the help provided !