Implementing multiple simulation state /group of parameters for Simulink model (Embedded coder)

3 Ansichten (letzte 30 Tage)
Good morning,
I have a model for which I require a standalone executable. I generated it using the embedded coder, but, It works just for one working point, corresponding to the workspace available when generating the code.
My issue is that, the code should stop when a certain condition is met, and restart other 2 times, with a different set of parameters.
I achieved that in pure simulation using a matlab script to set the parameters using a for each and starting the simulation using matlab command.
How could I handle that without relying on matlab, but just on simulink?
  3 Kommentare
Antimo
Antimo am 7 Apr. 2025
Due to its intended use in a future product, I cannot share the Simulink model directly. Currently, each operating point requires a separate resettable subsystem, and each use-case scenario is defined by a distinct MATLAB script, leading to different workspaces at executable generation.
My goal is to enable runtime modification of these parameters, ideally through C code integration or a Simulink feature. For instance, consider a scenario where a certain material thickness is reduced from thickness_1 to thickness_2. Upon completion of the process, the system should reset, initializing thickness_1 to thickness_2 and thickness_2 to the subsequent target thickness_3.
While I've implemented a MATLAB script-based reinitialization triggered upon simulation termination, I need a completely standalone solution, "MATLAB free".
Antimo
Antimo am 15 Apr. 2025
I also contacted the Matlab Support and they suggested to review this page for code generation interface :How can I create an executable from my Simulink model to send to someone who does not have MATLAB? - MATLAB Answers - MATLAB Central
But still to me is not clear how to tell the software to reload the parameters at runtime, and how to define from where the .exe should read them.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by