Application of casadi in rapid control prototype

8 visualizaciones (últimos 30 días)
Bowling
Bowling el 8 de Mzo. de 2023
Comentada: Bowling el 21 de Mzo. de 2023
The controller is coded in Simulink with "Matlab Function" module. When casadi toolbox is called using code 'import casadi.*' (like m.file), the compiler would go wrong with following information as :
"Import statements are currently unsupported. Function 'XXX' (#XXX.XXX.XXX), line XXX, column XXX: "import" Launch diagnostic report."
So how to call casadi in "Matlab Function" module correctly?
  2 comentarios
Daniel Alejandro Poveda Pi
Daniel Alejandro Poveda Pi el 20 de Mzo. de 2023
Hi! i'm having exactly the same issue! Could you please let me know if you find a way of making it work? (I'll for sure do the same if I manage to solve it).
Thanks for your time,
Daniel
Bowling
Bowling el 21 de Mzo. de 2023
Thank you for following this issue! Now I could run it in Simulation/Debug mode with "Matlab Function" block.
First, you need to write external function (like case.m file). Then, the external function needs to be declared before calling it with code "coder.extrinsic('case');" in "Matlab Function" block. In this way, it can work wel in these two modes.
However, the external declaration function can't build application which causes can't work in RCP platform.
If you have some advice, please leave a message!
Luka

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre COM Component Integration en Help Center y File Exchange.

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by