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
  • Index
  • » Users
  • » musa_me4
  • » Profile

Posts

Posts

Jan-09-18 09:04:22
I am trying to call a external .exe inside OpenModelica

I was able to successfully run the external .exe by calling it inside an external C function that is called inside OM. It does not work when I include the C function inside OM editor (for simplification). Anyone knows if I can call an external .exe inside OM directly? THANKS!

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.

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.

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.

  • Index
  • » Users
  • » musa_me4
  • » Profile
You are here: