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

Extract or Generate C code from Modelica model

Extract or Generate C code from Modelica model

Hello, I am still a beginner and I need some advices.

I have recently created a Modelica model on OMEdit and I would like to know if it is possible to extract or Generate a C code from the model or created a DLL / exe and use it on a Rasberry PI ?  If yes how can I do it ?

If you need more information don't hesitate.

Thanks in advance for your help.

Marc

Re: Extract or Generate C code from Modelica model

If you run a Linux copy of OpenModelica, it is possible to cross-compile for RPi. There are also packages available so you can run OpenModelica on your RPi 2+ (which is much simpler).

Re: Extract or Generate C code from Modelica model

Thank you for replying.

I am sorry but I think my question wasn't precise enough. I need my Modelica model to work on RPi but also need to work inside a preexisting program on RPi.

So it is possible to create a code (like C or Cpp) or a dll from Modelica model? Because I would like to make this code work with my other program on RPi and I don’t think that using Modelica directly on RPi could work in this case.

I hope my question is not too confusing.

Marc

Edited by: MarcoMarco - Nov-06-17 08:30:18

Re: Extract or Generate C code from Modelica model

Do some research on FMI: then you can control each step yourself and intergrate multiple tools. Or use the Modelica_DeviceDrivers library to communicate via some protocol in the simulation itself. Or simply use external "C" functions to communicate with the other process.

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