When I try to use a SimPowerSystem model as a model reference in MATLAB R2014a I get the following error:
error using ==> RTW.makertw.make_rtw
Error using ==> tlc_c
Error using ==> rtwgen
Error using ==> set_param
Model reference does not support non-inlined S-Functions. The S-Function 'sfun_spssw_contc' used in 'ActuatorModel_Final/powergui/EquivalentModel1/State-Space' is not inlined. To be able to reference the model 'ActuatorModel_Final', the S-function needs a target file (sfun_spssw_contc.tlc) and the option SS_OPTION_USE_TLC_WITH_ACCELERATOR must be set in the S-function source code.
Why am I getting this error?
Best Answer