OpenModelica


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » pbalda
  • » Profile

Posts

Posts

Hello,
I tried to use a FMU CS with a Boolean input. I was able to set the input value only once. The second call of fmu2SetBoolean() failed. I reduced the original model to the trivial case:

model ErrCSBooleanInput
  input Boolean MODE;
  parameter Real a = -1.0;
  parameter Real b = 1.0;
  output Real y;
equation
  y = if MODE then a else b;
end ErrCSBooleanInput;

I generated FMU 2.0 for Co-Simulation using OMEdit v1.12.0-dev-85-g1ca860b (32-bit). When it is runned in the last version of FMU checker on Windows by

fmuCheck.win32.exe -i input.txt ErrCSBooleanInput.fmu

the following error is reported (the complete list is longer):
    [FMU][logStatusError][FMU status:Error] fmi2SetBoolean: Illegal call sequence. fmi2SetBoolean is not allowed in Continuous-Time Mode state.
[FATAL][FMUCHK] Simulation loop terminated  at time 0.002 since FMU returned status: Error
    [FMU][logStatusError][FMU status:Error] fmi2Terminate: Illegal call sequence. fmi2Terminate is not allowed in Error state.
[ERROR][FMUCHK] fmiTerminateSlave returned status: Error

The contents of the input.txt file was:

time,MODE
0.1,0
0.2,0
0.3,1
0.4,1

I would appreciate any explanation of this error. I expected that Continuous-Time Mode is available only in FMI for Model Exchange (see the FMI 2.0 specification).
Thank you in advance.

Best Regards
Pavel Balda

Hello,
I generated several FMUs ver. 2.0 containing the Modelica.Mechanics.MultiBody.Joints.Revolute model. All these FMUs cause the crash of the FMUChecker tool. The same crash I obtained after import of these FMUs to Matlab-Simulink and also to our own software. It seems that the same problem is in both variants - Model Exchange and CoSimulation. Please, see the attached very simple example.

Best regards
Pavel Balda,
University of West Bohemia, Pilsen, CZ

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