Simulink.ValueType
Specify properties of signals based on application-specific value types
Since R2021b
Description
A Simulink.ValueType
object is an application-specific set of
properties that you define once and reuse for each signal that represents the same value type.
For example, you can specify the unit, minimum value, maximum value, and dimensions of wind
velocity, tire pressure, or water temperature.
To create and modify ValueType
objects in the base workspace or a data
dictionary, you can use the Model Explorer or
MATLAB® commands. You cannot store ValueType
objects in model
workspaces.
Specify a ValueType
object:
At an interface with Inport, Outport, In Bus Element, or Out Bus Element blocks
In a model with Signal Specification blocks
In a
Simulink.BusElement
,Simulink.Signal
, orSimulink.Parameter
object
Use ValueType
objects to validate the properties of a signal and enforce
consistency between connected blocks at an interface.
Creation
You can create a Simulink.ValueType
object several ways.
Interactively create a value type using the Type Editor or Model Explorer.
Programmatically create a value type using the
Simulink.ValueType
function described here.
Syntax
Description
returns a
vt
= Simulink.ValueTypeValueType
object with default property values.
Properties
Examples
Version History
Introduced in R2021b