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

Industrial Control Systems

Industrial Control Systems

Hi,

I was trying to use the free 'Industrial Control System'  library (available at http://marcobonvini.altervista.org/ics.php ) but for some reason I cannot load it.
This is the error that I obtain when opening package.mo (I'm using ubuntu 12.04 and OmEdit 1.9.0 beta):

Syntax    07:49:47    /home/ubuntu/Documents/IndustrialControlSystems/..//IndustrialControlSystems/MathOperations/RealType/Div.mo    63:22-63:23    The file was not encoded in UTF-8:
  "?".
  To change encoding when loading a file: loadFile(encoding="ISO-XXXX-YY").
  To change it in a package: add a file package.encoding at the top-level.
  Note: The Modelica Language Specification only allows files encoded in UTF-8.

If somebody could propose a solution that would be very nice!

thanks
Stijn

Re: Industrial Control Systems

Hi,

Add a file called package.encoding where package.mo is containing:
Windows-1252
.. or convert the files to UTF-8 using:
> for x in `find . -name '*.mo'` ; do iconv -f Windows-1252 -t UTF-8 $x > "$x.utf8"; rm $x; mv "$x.utf8" $x; done

Cheers,
Adrian Pop/

Re: Industrial Control Systems

thanks,

The command loadFile("package.mo", encoding="Windows-1252") gives true as a result, so this seems to work current/smile.

The next beginners question:
For some reason I cannot see the library appearing in Omedit. (Probably it will be something simple that I'm overlooking?)

regards
Stijn

Re: Industrial Control Systems

Hi,

Could somebody explain how you can make all the models included in this library visible in openmodelica (OMedit)?

thanks!

Re: Industrial Control Systems

Just open the library file (normally package.mo) in OMEdit.

Adeel.

Re: Industrial Control Systems

Well, if I do this I don't see anything.
So if you could provide me the steps that you exactly do, this would be very welcome!

thanks

There are 0 guests and 0 other users also viewing this topic