Assign String Values to Parameter Instances on Keyless Entry Architecture - MATLAB & Simulink (original) (raw)

Open Live Script

This example shows how to use a keyless entry system architecture model to assign string type parameters to represent device IDs of different receivers.

Open the keyless entry system project.

openProject("scKeylessEntrySystem");

Create String Type Parameter

To open the Parameter Editor, click the component FOB Locator System/Front Receiver, and from the Property Inspector, from the Parameters list, select Open Editor. In the Parameter Editor, from the Type list, select string to create a string type parameter DeviceID.

The DeviceID parameter is of Type string in the Parameter Editor.

Assign String Values to Parameter Instances on Architecture

String type parameters behave like other parameters. For more information, see Author Parameters in System Composer Using Parameter Editor. You can specify parameter values uniquely across repeated instances of model references linked to components. View and edit parameter values using the Property Inspector. Strings must be specified as expressions with double quotes, otherwise the parameter behaves like a symbol that evaluates to a string.

The Center Receiver has a parameter called DeviceID defined in the Property Inspector with value "002".

See Also

systemcomposer.arch.Parameter | addParameter | getParameter | resetToDefault | getParameterPromotedFrom | getEvaluatedParameterValue | getParameterNames | getParameterValue | setParameterValue | setUnit | resetParameterToDefault

Topics