Filter löschen
Filter löschen

Error in Simulink function scheduler : Test sequence editor

2 Ansichten (letzte 30 Tage)
Aishwarya
Aishwarya am 3 Aug. 2023
Kommentiert: Aishwarya am 23 Aug. 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.

Antworten (1)

Sugandhi
Sugandhi am 23 Aug. 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 Kommentar
Aishwarya
Aishwarya am 23 Aug. 2023
Thank you for your response, I will try the suggested and let you know.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Schedule Model Components finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by