Possible to force Iterator subsystem to execute only once per time step?

3 views (last 30 days)
I've created a Stateflow chart with an embedded Simulink PID controller. When I run the model, I get the error:
Function-call subsystem 'PID_Stateflow_Test/TestPID/StateOne.pid_control' cannot contain block 'PID_Stateflow_Test/TestPID/StateOne.pid_control/Discrete-Time Integrator' because this block requires a service that maintains the time that has elapsed between two consecutive executions. Since the function-call subsystem is being executed multiple times at t = 0, the concept of elapsed time is not well-defined between two such executions.
I assume this is because the embedded Simulink function is being called from the Stateflow state multiple times within a single time step. Is this true? If so, can I force the state du: function to execute only once per time step?

Answers (0)

Categories

Find more on Complex Logic in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!