Error in Simulink function scheduler : Test sequence editor

8 visualizaciones (últimos 30 días)
Aishwarya
Aishwarya el 3 de Ag. de 2023
Comentada: Aishwarya el 23 de Ag. de 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.

Respuestas (1)

Sugandhi
Sugandhi el 23 de Ag. de 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 comentario
Aishwarya
Aishwarya el 23 de Ag. de 2023
Thank you for your response, I will try the suggested and let you know.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by