Simulink Reference | ![]() ![]() |
Verify that an input signal has the specified dimensions, sample time, data type, and numeric type
Library
Description
The Signal Specification block checks that the input signal has certain specified attributes. If so, the block outputs the input signal unchanged. Otherwise, it halts the simulation and displays an error message.
The Signal Specification block can be used as a mechanism to ensure that the attributes of a signal meet the desired attributes for certain sections of your model. For example, consider two people working on different parts of a model. The Signal Specification block is useful for indicating which attributes of various signals are needed by the different sections of the model. If there is a miscommunication and data types are changed unexpectedly, the attributes do not match and Simulink reports an appropriate error. Using the Signal Specification block helps ensure that you do not introduce unexpected problems into your models. If you are familiar with the assert mechanism in languages such as C, you can see that the Signal Specification block serves a similar purpose.
The Signal Specification block can also be used to ensure correct propagation of signal attributes throughout a model. Simulink's capability of allowing many attributes to be propagated from block to block is very powerful. However, when using user-written S-functions, it is possible to create models that don't have enough information to correctly propagate attributes around the model. For these cases, the Signal Specification block is a good way of providing the information Simulink needs. Using the Signal Specification block also helps speed up model compilation when blocks are missing signal attributes.
Data Type Support
Accepts signals of any data type, including fixed-point data types but not int64
and uint64
, that matches the data type specified by the Data type parameter.
Parameters and Dialog Box
-1
--Any dimension accepted
n
--Vector signal of width n
accepted
[m n]
--Matrix signal having m
rows and n
columns accepted
-1
--Any sample time accepted
period >= 0
[offset, period]
[0, -1]
[-1, -1]
period
is the sample rate and offset
is the offset of the sample period from time zero (see Sample Time).auto
.Specify via dialog
is selected for the Data type parameter.Specify via dialog
is selected for the Data type parameter.real
or complex
) that the input signal must match. To accept any numeric type, set this parameter to auto
.sample-based
or frame-based
) that the input signal must match. To accept any sampling mode, set this parameter to auto
.Characteristics
Dimensionalized |
Yes |
Direct Feedthrough |
Yes |
Sample Time |
Continuous |
Scalar Expansion |
No |
Zero Crossing |
No |
![]() | Signal Generator | Sine Wave | ![]() |