- Redesign the model such that the pace will depend upon set parameters.
- Write a script that takes pacing as input, programmatically modifies the model parameters, and generates code for the updated model.
Pacer in the codegen Executable
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
I used to use the Set Pace block in the Aerospace Blockset for pilot in the loop simulation and use Simulink coder to generate a .exe file. The .exe can run in real-time as a standalone software without Matlab installed. Mathworks seems to block such function with latest Simulink Coder. The coder will ignor the pace block.
Is there any alternative way to generate an .exe with real-time pace?
Thanks!
0 comentarios
Respuestas (1)
Infinite_king
el 15 de Dic. de 2023
Editada: Infinite_king
el 15 de Dic. de 2023
Hi Oliver Ouyang,
I understand that you are looking for a block which has same functionality as ‘Set Pace’ or ‘Simulation pace’ block with the support of code generation.
The “Simulation Pace” block is not suitable for deployment, therefore, it will not generate deployable code. The “Simulation Pace” block allows you to slow down the pace of model simulation, enabling a more comfortable observation of connected animations and a clearer understanding of system behaviour. Slowing down the simulation rate facilitates a better grasp of the underlying system design, identification of design issues, and the demonstration of near real-time behaviour. It provides the ability to view results and inspect your system dynamically while the simulation is ongoing.
This block is particularly useful in situations where one simulated second corresponds to completion in a few milliseconds of wall clock time. While simulating, you can continue to utilize this feature through the 'Simulation Pacing Options.' For more details, please refer to the MATLAB documentation at, https://www.mathworks.com/help/simulink/slref/simulationpacingoptions.html?s_tid=srchtitle_site_search_2_set%20pace%20block
To achieve this behaviour in the executable, one possible approach I can suggest involves two steps:
For more information on setting the parameters programmatically, refer the following MATLAB documentation,
For more information on generating code, refer the following MATLAB documentation,
Hope this is helpful.
0 comentarios
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!