MATLAB: Is the data type is not back propagated as expected in Simulink 7.4 (R2009b)

simulink

In my model, I am using the Output Data Type option 'Inherit: Inherit via back propagation' for a block (say block A) whose output signal is named as 'MySignal' and is connected to another block (say block B) whose output data type is 'double'.
I expect the 'double' data type to be back propagated to the signal 'MySignal'. However, I notice that the data type for 'MySignal' is 'int8' which is the data type of the input signal from the 'Inport' block.

Best Answer

The 'Inherit: Inherit via back propagation' option is used in order to back propagate the data type of an input port to the output port of the precedent block in Simulink 7.4 (R2009b).
Input data types are generally not defined, except in some particular case. In the attached model 'Example_back_propagation_2.mdl', the sum block has 2 inputs and the option 'Require all inputs to have the same data type' in enabled.
This implies that the input data type of an 'Inport' block can be propagated to another input of this sum block.
In this example, Input 2 has a defined data type which is 'single', while the data type for 'MySignal' is set to 'Inherit via back propagation'. Therefore, 'single' data type the second input is back propagated to the first input of the sum block.
When the input data type of a block is undefined, it cannot be back-propagated to the outport of a block and hence the defaut rule is applied.
In the attached model, 'Example_back_propagation_1.mdl', the input data type of Block B is undefined therefore it cannot be back propagated to the outport of Block A.
As a result, Block A (Gain block) uses the default rule due to which the output signal has the same data type of the input 'int8' in this case.