Using Simulink | ![]() ![]() |
Verify that the input signal has specified dimensions, sample time, data type, and numeric type of a signal.
Library
Description
This block checks that the input signal has 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 uses as an assert 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 what attributes various signals are needed by the different sections of the model. If there is a miscommunication and say data types are changed unexpectedly, the attributes will not match up and Simulink will report an appropriate error. Using the signal specification block will help ensure you don't introduce unexpected problems in your models. If you are familiar with the assert mechanism in languages such as C, you will see that the signal specification block servers a similar purpose.
The Signal Specification block can also be used to assure correct propagation of signal attributes throughout a model. Simulink's capability of allowing many attributes to propagate from block to block is very powerful. However, it is possible to create models (when using user written S-functions) 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 when propagating attributes from block to block. The use of the signal specification block also helps speed up model compilation (update diagram) when blocks are missing signal attributes.
Data Type Support
Accepts signals of any data type that matches the data type specified by the Data Type parameter
Parameters and Dialog Box
-1
(don't care), n
(vector signal of width n
), [m n]
(matrix signal having m
rows and n
columns.period >= 0
, [offset, period]
, [0, -1]
, [-1, -1]
, where period
is the sample rate and offset
is the offset of the sample period from time zero (see Sample Time).double
, single
, int8
, uint8
, int16
, uint16
, int32
, uint32
, and boolean
.auto
(don't care), real
, or complex
.Characteristics
Direct Feedthrough |
Yes |
Sample Time |
Continuous |
Scalar Expansion |
No |
States |
0 |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Signal Generator | Sine Wave | ![]() |