Why can't I build model in Simulink which contains a S-function?

10 visualizaciones (últimos 30 días)
I'm learning the S-function with the examples in the Matlab, but I failed to build model of the examples. What is confused is that I could run the examples and went through the simulation when the building is blocked.I'm wondering why I can run the S-function but came across various errors, such as the lack of tlc files, the inappropriate configuration of the solver type, when I tried to build model. Many thanks!

Respuesta aceptada

Easwar Kumar Yarrabikki
Easwar Kumar Yarrabikki el 25 de En. de 2017
  • In order to generate code for the s-function, you must place the tlc file in the same folder of S-function. TLC means Target Language Compiler, Which is used to customize the code building process.
  • You opt S-function because none of Simulink library blocks Can perform what you really want to do, So you customized a Simulink Block according your requirment. In the same you need to guide MATLAB Coder With Customized building process to generate code for your Customized block.
  1 comentario
Sisi Di
Sisi Di el 20 de Feb. de 2017
  • Thanks a lot for your explanation of TLC.I have copied a TLC file of a similar example and pasted it over to the same folder as Rule1 said but it didn't work.
  • I'm confused about ""guide MATLAB Coder with customized building process". Would you like to explain or show how to achieve it? Since English is my second language, I'm afraid that I failed to understand it literally. I appreciate your answer.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Block and Blockset Authoring en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by