- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Anyone simulated an FMU with inputs...
Anyone simulated an FMU with inputs in openmodelica?
Anyone simulated an FMU with inputs in openmodelica?
Hello,
I have built model of a discrete controller which changes states on the basis of its inputs. It worked fine as a modelica model. I then exported it as an FMU and then re-imported it in openmodelica. Now when I am trying to simulate this re-imported FMU, I am not getting the desired results.
The imported FMU model has some code lines like this
{fmi_input_cmd, fmi_input_windowState} = fmi1Functions.fmi1SetInteger(fmi1me, {2.0, 3.0}, {cmd, windowState});
and it looks that the "fmi_input_cmd" variable should follow the "cmd" variable that is provided to the FMU externally; but it doesn't. In fact, I have two integer inputs and one boolean but none of the internal "fmi_input_variable" follows the connected external inputs.
Can anyone help?
Thanks
Re: Anyone simulated an FMU with inputs in openmodelica?
Can you send me your actual modelica model? adeel.asghar at liu.se
Adeel.
- adeas
- 454 Posts
Re: Anyone simulated an FMU with inputs in openmodelica?
Note that fmi_input_* are just dummy variables to make the modelica models valid. They are not supposed to follow the actual input values. You must see the values of cmd & windowState and make sure they are set properly.
- adeas
- 454 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » Anyone simulated an FMU with inputs...