Error with stateflow chart call to simulink function in a referenced model.

3 views (last 30 days)
Hi all,
I spent almost a day trying to figure out what's going wrong with my model and I'm still clueless. I really appreciate any help, suggestions or pointers in the right direction. I have a complex model containing multiple referenced models.
My Scenarios is as follows:
  1. Let's assume a Top Model as "TModel.slx". and contains a Stateflow Chart "Chart_1". The name of the referenced model is "Ref_A".
  2. Let's assume another Top Model as "CModel.slx" which contains a Simulink function "ReadData". The name of the referenced model is "Ref_B"
Now I tried calling the simulink function from the Stateflow chart using the notation
y = CModel.ReadData(true);
I get the following errors during compilation. Using this example and these guidelines, I ensured that the datatypes at the inports and outports are explicitly selected (in my case double). I also did the same with size.
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Only MATLAB files are supported for code generation. Unsupported file extension 'slx' for rootfolder\CModel.slx'.
State 'EntryState' in Chart 'TModel/Chart_1':
during: y = CModel.ReadData(true);
I tried all possible ways I could imagine of. It would be helpful if someone could help me this issue.
Thank you all in advance.

Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!