Setting Blocks as Both Modelica and Simulink
For cases where both Modelica and Matlab are used, or for setting generic templates to cover both products, you can set the references to both products' component-type in a SysPhS Block.
The predefined Blocks that come with the SysPhS Patterns already include both the Modelica and Simulink properties.
Here is an example of a Modelica component for an Op-Amp.
Here is an example of a Simscape component for an Op-Amp.
Note that as the fl_lib is referenced by 'Foundation', the SysPhS 'Name' is foundation.electrical.elements.op_amp.
Here are the 'Name' settings for both Modelica and Simulink.
To set the properties manually for both products, you must set the Stereotype for both. To do this on a newly-created SysPhs Block element, in the Properties window for that element:
- Select 'Stereotype'
- Click on the [...] button
- Select SysPhS in the Profile
- Tick both the SimulinkBlock and ModelicaBlock stereotypes