Why doesn't referenced model have proper tcl files?

조회 수: 4 (최근 30일)
Jay
Jay 2014년 10월 25일
답변: Sandip Kumar 2014년 10월 28일
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