Borrar filtros
Borrar filtros

Embedded Coder C-Code Abruf von Daten

1 visualización (últimos 30 días)
Markus König
Markus König el 7 de Ag. de 2024
Respondida: Akshat Dalal el 16 de Ag. de 2024
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!

Respuestas (1)

Akshat Dalal
Akshat Dalal el 16 de Ag. de 2024
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

Productos


Versión

R2024a

Community Treasure Hunt

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

Start Hunting!