Effacer les filtres
Effacer les filtres

Error in Simulink function scheduler : Test sequence editor

2 vues (au cours des 30 derniers jours)
Aishwarya
Aishwarya le 3 Août 2023
Commenté : Aishwarya le 23 Août 2023
I have created Harness of my model with Simulink function scheduler in it. I need to check if 'Time == 0.0 sec' then I have to initialize my system on Power on.
However if I add a 'if else' statement before 'send(D1)' in the Test Sequence editor, I get below error,
An error occurred while running the simulation and the simulation was terminated
Caused by:
  • The function-call initiator connected to input port 'D1[0.02]' did not execute the Model block 'XXXX' on time step '0.02'. When the Model block has the 'Schedule rates' parameter selected and 'Schedule rates with' is set to 'Ports', it must be executed periodically once it is activated (enabled) by its function-call initiator until it is terminated (disabled).
Any leads are appreciated.

Réponses (1)

Sugandhi
Sugandhi le 23 Août 2023
Hi Aishwarya,
I understand that you are facing an error occurred while running the simulation and the simulation was terminated.
The error is because you are trying to send a signal to the function scheduler before it has been enabled. The function scheduler is enabled when the first signal is sent to it. To fix this, move the if statement to after the first send statement.
  1 commentaire
Aishwarya
Aishwarya le 23 Août 2023
Thank you for your response, I will try the suggested and let you know.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Schedule Model Components dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by