MATLAB: How to eliminate the error reported about sample time propagation when using a model reference block in Simulink 7.7 (R2011a)

simulink

I have a simple model with the following blocks:
a. Sine wave source
b. Model reference block
c. Scope block
The model reference block references into a model with a Zero Order Hold and other basic blocks. I run the model that is shown below and I receive the following error message:
Root inports must have the same sample time as their destinations for model reference. Please correct this situation by changing one of the two sample times or inserting a Rate Transition block This error message is related to a hidden Inport block.

Best Answer

The error received from the top level model is for the following reason:
- The input port of the model reference block is sampled at a continuous sample time, whereas the subsequent block i.e. a 'Zero Order Hold' is sampled at a rate 0.003 (discrete). A single port cannot hold two distinct sample times.
Inserting a Rate transition block inside the model reference block will enable the continuous sample time at IN port to execute at a rate i.e 0.003 (discrete) of the Zero Order hold block.
Please refer to the attached model that fixes this error:
test_d1 - top level model
test_d2 - referenced model