Working and exportable PID controller

This commit is contained in:
2026-03-11 16:37:50 +01:00
parent 71722127f1
commit 9e124a5e92
4 changed files with 350 additions and 78 deletions

View File

@@ -1,11 +1,14 @@
setCommandLineOptions("--simCodeTarget=ExperimentalEmbeddedC");
setCommandLineOptions("--target=gcc");
setCommandLineOptions("-d=initialization");
loadFile("/work/EmbeddedControl.mo");
loadFile("/work/test.mo");
okCheck := checkModel(EmbeddedControl.Math.DDifference);
print("checkModel(EmbeddedControl.Math.DDifference) = " + String(okCheck) + "\n");
okCheck := checkModel(test.Controller);
print("checkModel() = " + String(okCheck) + "\n");
print(getErrorString());
okTranslate := translateModel(EmbeddedControl.Math.DDifference, fileNamePrefix="difference");
print("translateModel(test2d.Dcontroller) = " + String(okTranslate) + "\n");
okTranslate := translateModel(test.Controller, fileNamePrefix="controller");
print("translateModel() = " + String(okTranslate) + "\n");
print(getErrorString());