Borrar filtros
Borrar filtros

Configurable time delay for output in stateflow

10 visualizaciones (últimos 30 días)
thiyagarajan
thiyagarajan el 13 de Mzo. de 2023
Respondida: Bhanu Prakash el 17 de Mzo. de 2023
Hello Team,
I have nested if condition plotted in the stateflow, its working fine. but at the end of output , i need to wait to time delay for 100 ms.
Note:
  1. this stateflow i used to generate the c code(not only for simulation on matlab), so suitable time delay solutions is required.
  2. this time delay should be configurable. example : if i wanted to increase to 500ms or more later.

Respuestas (1)

Bhanu Prakash
Bhanu Prakash el 17 de Mzo. de 2023
Hi Thiyagarajan,
As per my understanding, you are trying to incorporate a configurable time delay in your stateflow model.
One workaround would be to use "Temporal logic operators" like the "after" operator.
The syntax is as follows:
after(n,msec)
where, "n" represents the number of time steps (100, in your case) and "msec (milli second)" is the time unit.
It returns "true" if at least n units of time have elapsed since the associated state became active. Otherwise, the operator returns "false".
You can refer to the documentation of "Temporal logic operators" here:
Hope this answer helps you.
Thanks,
Bhanu Prakash.

Categorías

Más información sobre Stateflow en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by