Possible to force Iterator subsystem to execute only once per time step?
6 views (last 30 days)
Show older comments
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?

1 Comment
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!