Thanks for the answer.
The only guess I could come up with is that are you by any chance
using float for your time and step variables?
I forgot to put in the previous post but the type of time
and step
is double
.
I have another testing model (attached) that is quite similar and it works with that step values.
And this second model have an integerStep
as well.
EDIT: I tried to vary the integerStep
height parameter, I found that the problem occurs only for odd values. Also, I tried the same test in the model attached in this post, found the same problem.
EDIT2: I removed the integer to real and integer to real conversion parts of the model and the problem doesn't happens anymore. I replaced them with a integer sum
block. So, in some way, the step value of 0.1 and 0.01, integerStep
block and conversion blocks doesn't properly work together for my simulation code.
Now is like this:

Attachments: