Error in Simulink function scheduler : Test sequence editor

10 views (last 30 days)
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.

Answers (1)

Sugandhi
Sugandhi on 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.

Categories

Find more on Schedule Model Components in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!