Why does my executable generated with Simulink Embedded Coder crash when using non-integer inputs to the program?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
MathWorks Support Team
il 22 Ago 2019
Risposto: MathWorks Support Team
il 28 Ago 2019
Why does my executable generated with Simulink Embedded Coder crash when using non-integer inputs to the program? I have modified the main file to accept a number as input, to specify the simulation end time. If I start the executable with an integer input, it runs fine. If I start the executable with a decimal input, it crashes without warning or error. Why is this and how can I solve it?
Risposta accettata
MathWorks Support Team
il 29 Ago 2019
In this particular case, Simulink Coder or Simulink Embedded Coder do not generate code for main functions that allow programs to take input values. Therefore this executable was built with a modified main.c file, where code for inputs must have been added to the main function (args c, args v[], and subsequent logic). for this functionality to be present.
Possible solution
The most likely issue is that the main function is not converting the char input to double correctly. Check out this external link for clues on how to fix it:
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!