Using Matlab code with Simulink Real time target
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I intend to use my algorithm written in Matlab (.m files) to control a mechanical system using a real time target PC from Speedgoat. I was able to build a model of the mechanical system for simulation in Simulink and then use the matlab code called as an extrinsic function to use it to control the system in simulation. However to transfer this to the real time target one has to go through the Simulink Coder which does not support extrinsic function calls to matlab code. I may also be able to write my .m file codes as Level 2 Matlab S-functions or generate C-code for it using Matlab coder. However it is not clear how to get these to compile with Simulink coder for the real time application. Currently using Matlab level 2 s-functions in my model fails to compile with the Simulink coder as it demands a corresponding .tlc (Target Language Compiler) file to be supplied with the S-function. However I could not find any documentation on what these files are or how to go about writing them.
I would be grateful if anyone can point to the right source of information for integrating your matlab code in simulink in a way that is compatible with the Simulink coder for real time application.
0 comentarios
Respuestas (1)
Juan Reyes
el 2 de Jun. de 2016
You need to create an S-Block function with a corresponding .tlc file for the code generation. http://www.mathworks.com/help/rtw/block-authoring-with-tlc.html?searchHighlight=Target%20Language%20Compiler
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!