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

Problems with Modelica_DeviceDrivers

Problems with Modelica_DeviceDrivers

I'm trying to get the Modelica_DeviceDrivers (https://www.modelica.org/libraries/mode … cedrivers) to work, but all I get when I'm trying to instantiate a test model is 'Error: Error occurred while flattening model' nothing more. Contacted the author of the lib, who told me that it was originally developed for Dymola. Does anybody have suggestions who to get more meaningful debug messages (debug flags "failtrace" and "dump" didn't help)?

Cheers, Ulysses

Re: Problems with Modelica_DeviceDrivers

The library is filled with stuff like "Modelica_DeviceDrivers/Blocks/Examples/testInputJoystick.mo:2:1-13:22:writable] Error: Expected the package to have name testInputJoystick, but got TestInputJoystick.".  Makes it a bit annoying to try to load a library when it is malformed.

I was able to flatten Modelica_DeviceDrivers.Blocks.Examples.TestInputKeyboardKey; which model did you have a problem with? (Also, note that you might want to use +showErrorMessages while using +d=failtrace from command-line).

Re: Problems with Modelica_DeviceDrivers

thanks, +showErrorMessages indeed made output more verbose

I'm trying to flatten
Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager_UDP
but get a lot of
NFSCodeDependency.analyseItem
errors

Cheers, Ulysses

Re: Problems with Modelica_DeviceDrivers

I guess you should contact the author again because the library has some errors in it (see https://trac.openmodelica.org/OpenModel … #comment:1 for details)

Re: Problems with Modelica_DeviceDrivers

The author has patched the code. Am testing it now.

Cheers, Ulysses

Re: Problems with Modelica_DeviceDrivers

The author has updated the code to comply with the specifications:
https://svn.modelica.org/projects/Model … iceDrivers

Unfortunately
simulate(Modelica_DeviceDrivers.Blocks.Examples.TestSerialPackager_UDP)
now leads to the following:

Error: Model is structurally singular, error found sorting equations 2: $PRE.getReal.y[2] = $_start(getReal.y[2]);
4: $PRE.getReal.y[1] = $_start(getReal.y[1]);
for variables getReal.y[3](1), getReal.y[2](3)
Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelites failed!


Cheers, Ulysses

Re: Problems with Modelica_DeviceDrivers

Yes, but the backend worked fine anyway and gave the correct message "Warning: No system for the symbolic initialization was generated. A method using numerical algorithms will be used instead.".

The real puzzler is why the external object constructor wasn't called before the object was used during initialization.

Re: Problems with Modelica_DeviceDrivers

There are 0 guests and 0 other users also viewing this topic
You are here: