Simulink Stateflow - 'after' condition not precise?

577 views Asked by At

I implemented an integrator (grounded capacitor driven by piece-wise constant current source) using Stateflow and the 'after' condition. See code.

With the given setting the capacitor should change its voltage every 1 sec, but does so about every 1.3 secs - Why?

Testbench

Statechart

Scope

1

There are 1 answers

0
bardo On

See my submission to File Exchange for an implementation in Stateflow.

Still looking for an S-function implementation.