Main Content

Author Parameters in System Composer Using Parameter Editor

This example shows how to add and modify parameters for a System Composer™ architecture model of a propeller by using a top-down authoring workflow available in the Parameter Editor. System Composer parameters synchronize with Simulink® for seamless simulation and code generation.

1. Create an architecture model called Propeller. Add a component called Hub to the model.

propellerarch.png

2. Click the Hub component, then open the Property Inspector. Pin the Property Inspector for easy access. To open the Parameter Editor, go to the Parameters list on the Property Inspector and select Open Editor from the drop-down list.

3. Click Add parameter. Define the bladePitch parameter with default value 45 and unit degrees.

bladepitchhubparameter.png

4. Click the Propeller root architecture. Open the Parameter Editor. Add a parameter named advanceSpeed. Set Value as 500, and Unit as mph.

airSpeed.png

5. Define a parameter named spinningRate. Set Value as 3, and Unit as Hz.

spinningRate.png

6. Click Promote parameter to open the Parameter Promotion: One-To-One section. Under the component Hub, select the bladePitch parameter. Click Promote to promote the parameter.

Parameter promotion enables easy access to parameter values and preserves distinct parameter values inside the model during simulation or code generation. Parameter promotion also removes unnecessary duplication of parameters defined on lower levels of an architectural hierarchy.

promoted.png

7. Change the default value of the promoted parameter bladePitch from the source component Hub to 72. The new value of the bladePitch parameter now appears for the architecture Propeller.

changevalue.png

See Also

| | | | | | | | | |

Related Topics