Simulink Reference Previous page   Next Page
Simulink.Signal

Specify the attributes of a signal

Description

Objects of this class allow you to specify the attributes that a signal or discrete state should have, e.g., its data type, numeric type, dimensions, and so on. You do this by giving the signal or discrete state the same name as the base (MATLAB) workspace variable that references the Simulink.Signal object. Then, whenever Simulink updates the diagram containing the signal or state, Simulink checks the actual properties of the signal against the properties specified by the signal object. For most properties, if the actual and specified properties are not the same, Simulink displays an error message. This enables you to quickly determine whether the actual attributes of your model's signals are the attributes you intend them to have.

In the case of a signal's storage class property, Simulink does not display an error if the model specifies the signal's storage class as auto (i.e., determined by Simulink) and the associated Simulink.Signal object specifies a different value. In this case, the value specified by the object overrides the value specified by the model. This allows you to use Simulink.Signal objects to control the visibility of signals (i.e., whether they are test points) from the MATLAB workspace (see Using Signal Objects to Designate Test Points).

Property Dialog Box

Data type
Data type of the signal. The default entry, auto, specifies that Simulink, should determine the data type. Use the adjacent pull-down list to specify built-in data types (e.g., uint8). To specify a custom data type, enter a MATLAB expression that specifies the type, e.g., a base workspace variable that references a Simulink.NumericType object or a Simulink data type function (e.g., sint(16)) that returns a MATLAB structure that defines the custom data type.
Units
Measurement units in which the value of this signal is expressed, e.g., inches. This field is intended for use in documenting this signal. Simulink ignores it.
Dimensions
Dimensions of this signal. Valid values are -1 (the default) specifying any dimensions, N specifying a vector signal of size N, or [M N] specifying an MxN matrix signal.
Complexity
Numeric type of the signal. Valid values are auto (determined by Simulink), real, or complex.
Sample time
Rate at which the value of this signal should be computed. See Specifying Sample Time for information on how to specify the sample time.
Sample mode
Sample mode of this signal. Simulink ignores the setting of this field.
Minimum
Minimum value that the signal can have. This field is intended for use in documenting this signal.
Maximum
Maximum value that the signal can have. This field is intended for use in documenting this signal.
Storage class
Storage class of this signal. See "Storage Classes of Tunable Parameters" in the Real-Time Workshop documentation for more information.
Alias
Alternate name for this signal. Simulink ignores this setting.
Description
Description of this signal. This field is intended for use in documenting this signal.

Properties

Name
Access
Description
DataType
RW
String specifying the name of the data type of this signal. (Data type)
Dimensions
RW
Scalar or vector specifying the dimensions of this signal. (Dimensions)
Complexity
RW
String specifying the numeric type of this signal. Valid values are 'auto', 'real', or 'complex'. (Complexity)
Min
RW
Minimum value that this signal can have. (Dimensions)
Max
RW
Maximum value that this signal can have. (Maximum)
DocUnits
RW
Measurement units in which this signal's value is expressed. (Units)
RTWInfo
RW
Information used by Real-Time Workshop for generating code for this signal. The value of this property is an object of Simulink.ParamRTWInfo class.
SampleTime
RW
Rate at which this signal should be updated. (Sample time)
Sampling Mode
RW
Sampling mode of this signal. (Sample mode)


Previous page  Simulink.ScopeDataLogs Simulink.StructElement Next page

© 1994-2005 The MathWorks, Inc.