I have a block point in a project and may be you can help me. I will try bellow to describe my issue.
I’m working in a project where I created a GUI in app designer. In the GUI I’m setting some parameters and I’m sending it to a Data Dictionary (DD) what is used in a Simulink model.
In Simulink Model based on some data and there is detected some state (for eg. Init, Ready, Fault, etc.) these states I need to send to GUI during simulation.
The sending data from Simulink model to GUI I’m doing using listener ( add_exec_event_listener(blk1, event, listener);)
The start/stop simulation of Simulink model is performing direct from GUI.
For start model simulation I’m using : open_system(simulinkModel);
set_param(simulinkModel,'SimulationCommand','start');
For stop model simulation I’m using:set_param(simulinkModel,'SimulationCommand','stop');
Until here everything is ok the simulation is as expected.
Next step is that all project should be standalone application and now are coming blocking point and the issues.
The GUI should be executable(.exe) and the Simulink model will be generated in C code with Simulink Coder and the source files should be integrated to exe GUI then it is created as standalone application.
But the standalone application should behave as described above.
From GUI.exe I need to send the parameters do DD also in parallel to a .mat file.
From application I need to receive in GUI.exe the status state((for eg. Init, Ready, Fault, etc).
In this case with standalone application where are integrated GUI.exe, source file (generated from Simulink model), DD how I can simulate it all together?
And to check if the behavior is expected one.
And instead listener what I need to use to receive the states from application to GUI.exe?