Data Dictionary usage with multiple harnesses

5 visualizzazioni (ultimi 30 giorni)
Dear
I am introducing Data Dictionaries (DD) in my simulink model. I will briefly describe the structure of the model, it is really not that hard:
  • I have two harnesses, one model 'Simulation' and one model 'Test'
  • Both harnesses contain a reference model to the same model 'Controller', which I want to simulate and test in abovementioned harnesses
  • Inside the model 'Controller', there are more referenced models and variant models
I have introduced a DD for the referenced model 'Controller' and for the harness 'Simulation'. This latter DD contains variables such as sampling times. The DD for 'Controller' references the DD for 'Simulation', such that it references the sample times.
dd_issue.png
My question now is, how can I manage the fact that the model 'Controller' together with its DD is used in two harnesses 'Simulation' and 'Test', who each have a different DD? When I use harness 'Simulation', I want the DD of 'Controller' to reference the DD of 'Simulation', but when I use harness 'Test', I want the DD of 'Controller' to reference the DD of 'Test'. I can reference the DD for both 'Simulation' and 'Test' in the DD of 'Controller', but I don't want to generate conflicts.
With kind regards,
Jonas

Risposta accettata

Jonas
Jonas il 29 Mag 2019
I have chosen to split-off all common data variables inside dd_Simulation and dd_Test and put them into dd_Global. The dd_Controller references this dd_Global, and dd_Simulation and dd_Test are simply linked to their respective models and are not referenced by dd_Controller.
dd_issue2.png
  2 Commenti
Denis Evstratov
Denis Evstratov il 4 Lug 2019
Modificato: Denis Evstratov il 4 Lug 2019
"... The dd_Controller references this dd_Global ...". On the picture above, it is the other way around: dd_Global references dd_Controller. I just wonder if that picture correct?
From my expirience, Simulink requires that a top-level model must be able to "see" all the data dictionaries in the hierarchy. Back to this example, it means that Simulation model should see not only dd_Global and dd_Simulation dictionaries but also dd_Controller. Can you please confirm that I am correct?
With kind regards,
Denis
Jonas
Jonas il 4 Lug 2019
Hi Denis
Could be that my figure is confusing, but dd_Controller references dd_Global. I do not reference dd_Controller in dd_Simulation nor in dd_Test. Maybe dd_SImulation can see dd_Controller because they are linked to their respective models, which are linked through model referencing: Controller is a model reference inside Simulation.

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by