Effacer les filtres
Effacer les filtres

Embedded Coder C-Code Abruf von Daten

22 vues (au cours des 30 derniers jours)
Markus König
Markus König le 7 Août 2024 à 9:56
Réponse apportée : Akshat Dalal le 16 Août 2024 à 9:49
Hallo zusammen,
Ich habe einen einfachen RC-Tiefpass in Simulink (siehe Bild) erstellt und mittels des Embedded-Coder C-Code mit einem zugehörigen Main-File generiert. Ziel ist es das Modell mittels Code abzubilden und die Ausgaben zu erhalten:
Mir stellt sich die Frage, wie ich im generierten Code folgendes einstelle bzw. erhalte:
  • Stopzeit der Simulation (wenn ich den Code richtig lese, dann gibt es keine Abbruchbedingung)
  • Ausgangswerte (z.B. in diesem Fall die Ausgangsspannung/maximale Ausgangsspannung)
Die Eingangswerte sind wenn ich es richtig sehe in der CodeGenerations.c-Datei entalten.
Vielen Dank für jede Hilfe!

Réponses (1)

Akshat Dalal
Akshat Dalal le 16 Août 2024 à 9:49
Hallo Markus,
Leider bin ich mit Deutsch nicht vertraut und werde auf Englisch antworten.
The rtw_solver.h and rtw_continuous.h files in the attached 'C-Code.zip' file containing the generated code are used for the execution-spec of the model and contain all related information such as the stop-time, sample-time etc. For more information, please refer the following documentation: www.mathworks.com/help/releases/R2024a/rtw/ug/build-process-file-dependencies.html
The variables corresponding to the input/outputs can be easily found using highlighting feature on the generated code. Please refer the following documentation for more information: www.mathworks.com/help/releases/R2024a/ecoder/ref/modeltocode.html

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!