I am trying to export a couple of models from OpenModelica as FMU 2.0 for Model Exchange.
In order to check the generated FMUs I import them back to OpenModelica and simulate there. Everything works well with simple continuous systems like a single integrator or series connection of the first order filters. However the blocks with triggered events, e.g. a standard modelica block "Modelica.Blocks.MathInteger.TriggeredAdd", don't work within FMU. Their output remains zero unaffected from inputs. It seems that I am doing something wrong but I have no idea what exactly. Please help me :) Here is an example code for exported model:
model trig_int_sum
Modelica.Blocks.MathInteger.TriggeredAdd triggeredAdd1 annotation(...);
Modelica.Blocks.Interfaces.IntegerInput u annotation(...);
Modelica.Blocks.Interfaces.BooleanInput u1 annotation(...);
Modelica.Blocks.Interfaces.IntegerOutput y annotation(...);
equation
connect(y, triggeredAdd1.y) annotation(...);
connect(triggeredAdd1.u, u) annotation(...);
annotation(...);
end trig_int_sum;