How can I build a Simulink model that consists of S-function to '.sdf' file that can be supported by the dSpace Control Desk?

6 views (last 30 days)
The user-defined block I use in the Simulink is the "S-function" block. It is linked to an ".m" file in the Matlab workspace. I had no issues running the files in the Simulink. However, as I click ctrl+B to build the control model file (.slx) in Simulink, I faced error as follows:
_ _ Error: File: C:\Program Files\MATLAB\R2013b\rtw\c\tlc\lib\utillib.tlc Line: 975 Column: 8 %exit directive: Simulink Coder Fatal in block: "NewMCL_Jo/MCL/VAD Control/Vivian MPC/MPC", block type "S-Function": MFile S-functions without a corresponding TLC file are not supported. You can inline your S-function (generic_mpc_multiobjective_LTV_HVAD) by creating a TLC file for it. You can also remap your S-function to C by creating a corresponding C Mex source file and a generic_mpc_multiobjective_LTV_HVAD.tlc file in the same directory as the MFile S-function which contains (on the first line): %% CallAsCMexLevel1 or %% CallAsCMexLevel2__
Can any of you help me to solve the issue?
Thanks.

Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!