Interface Gui and Simulink in order to generate an executable

Hello, I need your assistance about the best way to write the interface between several gui and a simulink model, but in a way that makes me generate a standalone executable. What I want is a simulation controlled by a Gui, running during infinite time unless asked by the user through the Gui. Also the user shall be able to change the inputs data of the simulink model on the fly. The Gui shall display on the fly the outputs of the simulink model. What I did is to use set_param for the intputs, and StartFcn callbacks in the simulink model for the outputs. I already found that using set_param is not possible if an executable has to be generated. It seems that the use of MAT file is not possible neither since it cannot be written on the fly (correct ?). So how do I do, what are the main concepts to use ?? is the use of simulink callbacks possible for the outputs that shall be displayed on the gui, even when an executable is generated ? Thank you very much in advance for your help. It is quite urgent since I have spent much time in that problem...

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 10월 22일
편집: Kaustubha Govind 2012년 10월 22일

0 개 추천

I think the best way would be to use Simulink Coder to generate a shared library out of your model. Look for mdl_Uptr and mdl_Yptr on that page to see how the inputs/outputs can be accessed.
If you plan to use the Simulink code in conjunction with MATLAB Compiler, please see this previously answered question.

추가 답변 (1개)

Sandy
Sandy 2012년 10월 24일

0 개 추천

Thank you for your answer. Unfortunatly I don't have Embedded Coder so I cannot generate a shared library. And the link you give to a similar question does not really answer to my question because I need to share the data with Simulink on the fly. Anyway I have asked my question to the Matlab support.

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by