Good Morning!
I have different problems or lack of knowedledge. First of all I have a Gui and it use a simulink mdl file to do different calculus. At the mdl file I use S-function, which are write in C++ language. My objective is to create one .exe file to use all the program (GUI+simulink) without installing Matlab.
At the program I want to first configurate the variables and then watch some values at the GUI (at real time). The Gui is only .m file (I don`t have the .fig file). So I have read a lot but I dont know something.
1- it is possible to do only one .exe, or ihave to do 2 one for simulin and other for the GUI?
2- to create the simulink .exe I have to use RTW, but how I can configurate the simuink.exe before start executing? now I am using workspace variables, later with the .exe could I use workspace variables?
3- if I have 2 .exe (one for simulink and another for GUI) how will comunicate they? How I can access to simulink variable from the gui (i only want the command)?
maybe in the future I will have more questions but to start reading and doing different test i will need some help.
Thanks for all and excuse me for the English level.

 Respuesta aceptada

Anthony Poulin
Anthony Poulin el 20 de Mayo de 2015

1 voto

Hey Ander,
First what you want to do is possible!
Then, to do it you have to create a DLL from your simulink model and an exe from your GUI (the exe will call the DLL).
Do not hesitate, if you have questions or misunderstanding in this tutorial.
Anthony

3 comentarios

ander
ander el 21 de Mayo de 2015
and for example can I use listeners (add_exec_event_listener) using the dll? are they compatible? or I have to create a file write there with the dll and after that read from the GUI?
Thanks a lot, it is something beautiful that this kind of things are possibles.
Anthony Poulin
Anthony Poulin el 21 de Mayo de 2015
For these questions, I have not answers... It seems complicated, because (if I remember well) the output of your listener is a handle in your WS and when your model is compiled as a DLL, you have not a Matlab WS...
You have to try it!
ander
ander el 2 de Jun. de 2015
Excuse me, but how I have to start the dll? I have to change all the gui and use callib and things like this to start or to stop?
thanks in advance

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

el 19 de Mayo de 2015

Comentada:

el 2 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by