Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » Clavijo
  • » Profile

Posts

Posts

Thank you Adeel! And thank you for all your fast and useful responses! I'm going to try with JModelica.

Best regards,

Hugo

Oh ok. I thought you have it as a beta version.

Do you know any other open tool like OM that supports import/export FMUs for co-simulation, apart from FMU SDK?

Thank you.

Hugo

Thank you Adeel. This is it.

bouncingBall.fmu

(The FMU SDK version is 2.0.3 and the bouncingBall.fmu is from "fmusdk\fmu10\fmu\cs\x64")

Hugo

Thank you Adeel! I added "public" but I got the same error, but anyways I have seen that, as you said, I should not change the generated FMU code. So if I need to change something, I will create a new FMU.

Now, I tried to use the FMU block of the bouncingball from the FMU SDK in a new model and I got an error when trying to simulate:

Code:


[:0:0-0:0] Error: Failed to open simulation result C:/OpenModelica1.9.1Beta2/share/doc/omc/testmodels/Test_res.mat: Too few rows in data_2 matrix

Also, in the Simulation Output window it says:

Code:


Process crashed
Simulation process exited with code -1073741819

Why does it happen? Is it because FMU SDK has something different in their FMUs that OM does not support?

I'm trying with this FMU SDK example because in my project I will have C code from Matlab/Simulink and in order to convert it to FMU I will use FMU SDK. Or is there another way to generate an FMU from C code?

Again, thank you so much.

Hugo

Hi,

I finally find out how to put I/O in a FMU block. But now, when trying to save after having modified something in the generated FMU of the 'BouncingBall' model, an error turns up:

Code:


[:0:0-0:0] Error: Failed to insert class fmi1CompletedIntegratorStep within BouncingBall_me_FMU.fmi1Functions;
the available classes were:
  Modelica.SIunits.ComplexPower
  Modelica.SIunits.ComplexAdmittance
  Modelica.SIunits.ComplexImpedance
  Modelica.SIunits.ComplexReluctance
  Modelica.SIunits.ComplexMagneticFlux
  Modelica.SIunits.ComplexMagneticFluxDensity
  Modelica.SIunits.ComplexMagnetomotiveForce
  Modelica.SIunits.ComplexMagneticPotentialDifference
  Modelica.SIunits.ComplexMagneticPotential
  Modeli...

And the same error with all classes: fmi1nextEventTime, fmi1EventUpdate, fmi1setString, fmi1GetString...

So I put everything as it was at the beginning but I got the same error. How can I fix it? Is it because I can't touch the code once the FMU is generated?

Thank you in advance.

Best,

Hugo

Thank you Adeel for your fast response. When will you upload the new version? If it's going to take some time, could you send me that picture please?

Regarding the second question, for example, if I want to connect a resistance to a FMU block as an input and a motor as an output (as in the picture attached), how can I create the ports of input/output in the FMU block in order to connect them? I haven't been able to find how to do it.

https://openmodelica.org/images/agorapro/attachments/4092/mini_I-O-FMU-block.jpg

Sorry for my ignorance and thank you for your time.

Hugo

Hi,

I'm very new into OpenModelica, so sorry if this is a very basic issue but I'm a bit lost.

I would like to use FMU blocks for co-simulation in my project and connect them to other blocks. In order to learn how to do it, I have installed the FMU SDK to start using example models of FMU, like bouncingBalls.fmu that I first run to compare it to the figure of the User's Guide (p.92). But when I use the FMU Import of the OMEdit, it doesn't appear the same thing as in the figure of the User's Guide. I mean, I don't get all the components in the Libraries Browser (left column) as in the figure of the User's Guide and I can't find out why. Am I missing something or am I doing it wrong?

And another question related to the same example. When I put the FMU block in a new model I don't know how to insert inputs/outputs. Can I do it directly in the Diagram View or do I have to change it in the code?

Thank you for your patience and hope you can help me!

Best regards,

Hugo

PS: I use version 1.9.1 Beta2 (r19512)

  • Index
  • » Users
  • » Clavijo
  • » Profile
You are here: