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

15 Ansichten (letzte 30 Tage)
Andrew P
Andrew P am 14 Mär. 2015
Kommentiert: Luigi Gervasio am 3 Sep. 2021
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?

Antworten (0)

Kategorien

Mehr zu Stateflow finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by