Book a Demo

Author Topic: OpenModelica: Class not found in Scope  (Read 12975 times)

EAButNotForGames

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
OpenModelica: Class not found in Scope
« on: March 01, 2024, 08:07:03 pm »
Hello,

I am currently trying to recreate a OpenModelica-Model in EA as shown in a Sparx Webinar
https://www.youtube.com/watch?v=ARQha0EUEqE
After recreating it I get the Error: "Class Modelica.Electrical.Digital.Sources.Clock not found in scope Counter"
Does anyone have any experience with the OpenModelica integration.
I am using EA-Version 16.1

EAButNotForGames

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: OpenModelica: Class not found in Scope
« Reply #1 on: March 04, 2024, 07:45:07 pm »
Update:
Even though the Validation and the solve is printing out an error, EA generates a Modelica circuit, which is almost functional.
Only the logical 1 for the table is not set. After setting it, the circuit can be simulated in OpenModelica, but not in EA.

I tried a different example. And this Time in 15.2, which the example is also made with:
https://www.youtube.com/watch?v=RnWl_0KdoZw
I recreated this circuit.
Now I get the  Error: Modified element freqHz not found in class Sine.
But this time, after opening the generated OpenModelica-Circuit, I can simulate it immediately

EAButNotForGames

  • EA User
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: OpenModelica: Class not found in Scope
« Reply #2 on: March 05, 2024, 12:44:08 am »
Update #2:
It is working now.
The example, presented in the Webinar doesn't work in Version 16.1.
I had to go back to 15.2.
Also:
-make sure to use OpenModelica Version 4.0.0 or else it doesn't find the Digital Clock
-Ports, which do not have a Block as a Type must be Modelica Ports
-Port names musn't start with capital letters
-use the Stereotype ModelicaParameters for Variables

at leats that worked for me