CATIA-Systems / FMIKit-Simulink

Import and export Functional Mock-up Units with Simulink
Other
157 stars 51 forks source link

Inital constant value output #430

Open hitotech1221 opened 1 year ago

hitotech1221 commented 1 year ago

When outputting a non-zero constant such as a constant block as is, the output is zero at time 0. This behavior is different from the official simulink fmu block. In line 1776 of sfun_fmurun.c, shouldn't h>=0 instead of h>=0?

t-sommer commented 1 year ago

Can you provide an example to reproduce the problem?

hitotech1221 commented 1 year ago

This occurred with 3.1 mex files, not with 3.0. Attached is a screen shot of the problem, and the FMI-kit outputs the constant value with a delay. The top is the FMI-kit block and the bottom is the FMU block in simulink. The output of the In1 signal is also delayed. This is common between 3.0 and 3.1.

2023-06-20 134403

t-sommer commented 1 year ago

Can you share the model and FMUs above?

hitotech1221 commented 1 year ago

forgit.zip Attached files.