필터 지우기
필터 지우기

Error in Simulink function scheduler : Test sequence editor

조회 수: 2 (최근 30일)
Aishwarya
Aishwarya 2023년 8월 3일
댓글: Aishwarya 2023년 8월 23일
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.

답변 (1개)

Sugandhi
Sugandhi 2023년 8월 23일
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
Aishwarya
Aishwarya 2023년 8월 23일
Thank you for your response, I will try the suggested and let you know.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by