MATLAB: Data Dictionary usage with multiple harnesses

data dictionaryreference modelsimulinktest harness

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

Best Answer

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