- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Online simulation by reading data...
Online simulation by reading data from Excel
Online simulation by reading data from Excel
Hi,
Is there any working solution for Excel to OpenModelica interfacing, where time series data from Excel can be read and used for online/real-time simulations? Already tried the ExternData library that works for Dymola but unfortunately doesn't works for OpenModelica.
Thanks in advance.
Re: Online simulation by reading data from Excel
Can't you just export the time series from Excel as csv and use the CombiTimeTables from MSL or something similar?
- sjoelund.se
- 1700 Posts
Re: Online simulation by reading data from Excel
Thanks for such a quick reply,
The excel file is connected to an online database. Converting it to a CSV may be an option for offline simulation. However, here I am looking for a solution so that I can run it online.
Thanks again.
Re: Online simulation by reading data from Excel
OK, what errors do you get from ExternData? I guess that's your only choice, but since OpenModelica is MinGW-based on Windows, you might need to compile some libraries yourself to match MinGW rather than visual studio...
- sjoelund.se
- 1700 Posts
Re: Online simulation by reading data from Excel
I am using OpenModelica Latest NighlyBuild version in Windows 10. Also followed the instructions given by the developer to run it in OpenModelica. It gives following errors that I do not understand. Maybe you can tell something by looking at them.
[1] 11:20:13 Translation Notification
[ExternData: 512:7-520:18]: Created directory C:\Users\mrn04\AppData\Local\Temp\/omc_compile_ED_XMLFile_422688
[2] 11:20:13 Translation Notification
[ExternData: 512:7-520:18]: cp -a "C:/OpenModelica1.12.0-dev-64bit/lib/omlibrary/ExternData 2.2.0/Resources"/* "C:\Users\mrn04\AppData\Local\Temp\/omc_compile_ED_XMLFile_422688"
[3] 11:20:13 Translation Notification
[ExternData: 512:7-520:18]: Changed directory to C:/Users/mrn04/AppData/Local/Temp/omc_compile_ED_XMLFile_422688/BuildProjects/autotools
[4] 11:20:13 Scripting Error
Error opening file: log: No such file or directory.
[5] 11:20:13 Translation Error
[C:/dev/OpenModelica64bit/OMCompiler/Compiler/SimCode/SimCodeFunctionUtil.mo: 742:9-742:129]: Internal error function elaborateFunction failed for function:
function ExternData.Functions.XML.getReal"Inline never" "Get scalar Real value from XML file"
input String varName "Key";
output Real y "Real value";
input ExternalObject ExternData.Types.ExternXMLFile xml "External XML file object"; external "C" y = ED_getDoubleFromXML(xml, varName);
end ExternData.Functions.XML.getReal;
[6] 11:20:13 Translation Error
[C:/dev/OpenModelica64bit/OMCompiler/Compiler/SimCode/SimCodeUtil.mo: 603:5-603:83]: Internal error Creation of Modelica functions failed.
Thanks.
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Online simulation by reading data...