Why doesn't referenced model have proper tcl files?

3 次查看(过去 30 天)
I have a simulation that runs just fine without a referenced model. When I change one of the blocks to a referenced model, it passes all of the checks and builds the model just fine. But when I then run the simulation with the referenced model replacing the original block, I get the following error: (in response to command SimOut=sim(mdl))
Error reported by S-function 'PV_Inv_Ctrls0_msf' in 'AvgAndSW_141017/3PH INV/TmpSFcnForModelReference_PV Inv Ctrls': S-function discreteVariableTransportDelay does not have a tlc file. It cannot use macros that access regDataType field in simstruct.

回答(1 个)

Sandip Kumar
Sandip Kumar 2014-10-28
Model reference, with S-functions have limitations and in Accelerator mode need to take care of few things in the S-function. The details are mentioned here: http://www.mathworks.com/help/simulink/ug/model-referencing-limitations.html#brazo0s-1_1
Also are you running Model Reference in Normal mode or Accelerator mode?
The following document covers usages of S-functions inside a Model reference: http://www.mathworks.com/help/simulink/ug/using-s-functions-with-model-referencing.html
Furthermore, for the S-function, do you have a TLC file? If so, use the SS_OPTION_USE_TLC_WITH_ACCELERATOR as mentioned in the above links.
Furthermore, for Normal Mode Model Reference and usage of S-functions, please read this section: http://www.mathworks.com/help/simulink/ug/using-s-functions-with-model-referencing.html#bsp24qn-6
Thanks, Sandip

类别

Help CenterFile Exchange 中查找有关 Block and Blockset Authoring 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by