- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Industrial Control Systems
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/
- adrpo
- 885 Posts
Re: Industrial Control Systems
thanks,
The command loadFile("package.mo", encoding="Windows-1252") gives true as a result, so this seems to work .
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
Just open the library file (normally package.mo) in OMEdit.
Adeel.
- adeas
- 454 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Industrial Control Systems