Value Properties

Value properties of a block specify information that characterize the block.

Context

Value properties as a separate symbol are available only in parametric diagrams that represent a block. Value properties are equivalent to the values owned by blocks in block definition diagrams (see the Values tool in Blocks). Changes made to the value properties in a parametric diagram are synchronized to the relevant block’s Values compartment in block definition diagrams.

For example, the VehicleFuelSupply block can have value properties such as FuelFlowRate, Pressure, and FuelDemand.

Procedure

  1. Drag the Value Property tool from the toolbox and drop onto the parametric diagram. Specify a name and data type for it.

    The following properties are available on the Info tab in the General category:

    Property

    Description

    Name/Code/Comment

    Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is synchronized with the name. To decouple name-code synchronization, enter a new code in the Code field.

    Data Type

    Specifies the data type of the value property, which must be a value type (String, Boolean, Integer, Real, or other value types created in your model).

    Initial Value

    Specifies the initial value of the value property.

    Multiplicity

    Specifies the multiplicity of the value property.

    On the Info tab in the Standard Constraints category, enter a Minimum, Maximum, and Default value for the value property as appropriate. You can also specify a List of Values for it.

    The other tabs such as Dependencies and Diagrams contain additional properties information. For details, see Object Properties.
  2. [optional] You can also reuse a value property owned by a sub-blocks nested within the structure of the diagram block, in order to bind it to the corresponding parameter in the diagram. Choose the Reuse Model Objects tool, drag the value property from under its parent block/part/reference in the objects hierarchy list, and drop it onto your diagram.
  3. Use the Binding Connector tool in the toolbox to connect it with a constraint parameter as appropriate.