Skip to content

Commit

Permalink
SImplified and updated example, make cross-compiled FMUs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dag Brück committed Feb 16, 2024
1 parent 9943b15 commit b785c2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
15 changes: 9 additions & 6 deletions examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,33 @@
// Script generated by Dymola.

OutputCPUtime = false;
Advanced.Translation.EnableCodeExport=true;
Advanced.FMI.CrossExport=true;

translateModelFMU(
"sse_edrive.stimuli",
false,
"stimuli_model",
"2",
"cs",
false,
"all",
true,
0,
fill("", 0));
translateModelFMU(
"sse_edrive.emachine",
false,
"emachine_model",
"2",
"cs",
false,
"all",
true,
0,
fill("", 0));
translateModelFMU(
"sse_edrive.mass_damper",
false,
"edrive_mass",
"2",
"cs",
false,
"all",
true,
0,
fill("", 0));
4 changes: 2 additions & 2 deletions examples/DC-Motor2023/models/sse_edrive/package.mo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sse_edrive "ProSTEP Smart System Engineering DCMmotor example"

annotation (
uses(Modelica(version="4.0.0")),
version="1.1.1",
version="1.2.0",
conversion(noneFromVersion=""),
versionDate="2022-03-22");
versionDate="2024-02-16");
end sse_edrive;
8 changes: 1 addition & 7 deletions examples/DC-Motor2023/models/sse_edrive/stimuli.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,8 @@ model stimuli "Stimulus of e-drive example"
annotation (Placement(transformation(rotation=0, extent={{100,-70},{120,-50}})));
Modelica.Blocks.Interfaces.RealOutput U(unit="V")
annotation (Placement(transformation(rotation=0, extent={{100,50},{120,70}})));
Modelica.Blocks.Math.Gain gain(
k=-1,
u(unit="N.m"),
y(unit="N.m"))
annotation (Placement(transformation(extent={{0,-70},{20,-50}})));
equation
connect(M_load, gain.y) annotation (Line(points={{110,-60},{21,-60}}, color={0,0,127}));
connect(gain.u, MLoad.y) annotation (Line(points={{-2,-60},{-39,-60}}, color={0,0,127}));
connect(Voltage_step.y, U)
annotation (Line(points={{-39,40},{32,40},{32,60},{110,60}}, color={0,0,127}));
connect(MLoad.y, M_load) annotation (Line(points={{-39,-60},{110,-60}}, color={0,0,127}));
end stimuli;

0 comments on commit b785c2f

Please sign in to comment.