From b785c2f07a56516c44398827854984e1658a2c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag=20Br=C3=BCck?= Date: Fri, 16 Feb 2024 13:37:32 +0100 Subject: [PATCH] SImplified and updated example, make cross-compiled FMUs --- .../models/sse_edrive/Export FMUs.mos | 15 +++++++++------ .../DC-Motor2023/models/sse_edrive/package.mo | 4 ++-- .../DC-Motor2023/models/sse_edrive/stimuli.mo | 8 +------- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos b/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos index ced6d13..a7c92cc 100644 --- a/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos +++ b/examples/DC-Motor2023/models/sse_edrive/Export FMUs.mos @@ -2,13 +2,16 @@ // 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( @@ -16,8 +19,8 @@ translateModelFMU( false, "emachine_model", "2", - "cs", - false, + "all", + true, 0, fill("", 0)); translateModelFMU( @@ -25,7 +28,7 @@ translateModelFMU( false, "edrive_mass", "2", - "cs", - false, + "all", + true, 0, fill("", 0)); diff --git a/examples/DC-Motor2023/models/sse_edrive/package.mo b/examples/DC-Motor2023/models/sse_edrive/package.mo index b90a2ee..adb6789 100644 --- a/examples/DC-Motor2023/models/sse_edrive/package.mo +++ b/examples/DC-Motor2023/models/sse_edrive/package.mo @@ -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; diff --git a/examples/DC-Motor2023/models/sse_edrive/stimuli.mo b/examples/DC-Motor2023/models/sse_edrive/stimuli.mo index 77606e4..c6f998a 100644 --- a/examples/DC-Motor2023/models/sse_edrive/stimuli.mo +++ b/examples/DC-Motor2023/models/sse_edrive/stimuli.mo @@ -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;