- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Advice on using FMU with a user...
Advice on using FMU with a user interface
Advice on using FMU with a user interface
Hello,
I intend to use OpenModelica for modelling an aircraft and export the model to .fmu. In the simulation, a graphical UI will be used for changing in real-time certain parameters of the aircraft and to output in real-time parameters of the aircraft. The graphical UI will be programmed in C++ and not in OpenModelica.
My question is, how can I send the information provided by the operator through the graphical UI to the FMI? Can I use a network connector e.g. netcat?
I haven't found any clue on the internet and would appreciate to have some ideas. If this is not possible, I will have to program the model of the aircraft in native C which will be troublesome for any future alteration.
Thank you!
Jean
Re: Advice on using FMU with a user interface
Your FMI master algorithm controls all the inputs of the FMU, so you can can change any input signal to whatever you desire.
The master algorithm can be written in any language that can import shared objects, and if this programming languages allows TCP/IP or similar of course you can send signals to the FMU.
You could also integrate the GUI with the FMU master by directly calling the FMI API from GUI.
- sjoelund.se
- 1700 Posts
Re: Advice on using FMU with a user interface
Always write your own
PyFMI seems to be able to do what you want though:
check fmu_with_input_function.py - it seems to get the current time as input, so you should be able to read the controls in the GUI from this functions and return the input value to the simulation in progress.
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Advice on using FMU with a user...