- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Translation Error: Looking for a...
Translation Error: Looking for a function Clock but found a Clock.
Translation Error: Looking for a function Clock but found a Clock.
I am new to the Modelica language in general and OpenModelica in particular, and I try to simulate the hybrid tank model from the book "Principles of Object Oriented Modeling and Simulation with Modelica 3.3" (section 13.4.1). Everything works as expected for the first models (TankPI and TankHybridPI). However, when I try to flatten the next model, TankHybridPIClocked, I get an error:
[26] 15:21:46 Translation Error
[PIDiscreteControllerClocked: 6:3-8:11]: Looking for a function Clock but found a Clock.
[27] 15:21:46 Translation Error
Error occurred while flattening model TankHybridPIClocked
Any help with that problem would really be appreciated.
Re: Translation Error: Looking for a function Clock but found a Clock.
You should make sure that Modelica language standard is set to 3.3.
Modelica libraries can change language standard, when loaded.
Also OpenModelica has limited support for synchronous features and some models might not work.
Re: Translation Error: Looking for a function Clock but found a Clock.
Okay, I added +std=3.3 to Options -> Simulation -> OMC Flags. Now I get a different error message:
[5] 11:40:17 Translation Error
[PIDiscreteControllerClocked: 6:3-8:11]: Failed to instantiate equation
when Clock() then
x = previous(x) + error * Ts / T;
end when;.
[6] 11:40:17 Translation Error
Error occurred while flattening model TankHybridPIClocked
The same happens with +std=latest. So, the model is not supported in OpenModelica? Has someone else tried it?
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Translation Error: Looking for a...