How to create a subsystem running at an integer number of sampling rate of its parent's subsystem, which is a function call triggered?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi,
In Simulink, I have a function-call subsystem running at 10ms. Inside this I want to have a subsystem running at 4 seconds. Can you please advise?
Thanks,
댓글 수: 0
답변 (1개)
Fangjun Jiang
2020년 7월 12일
If the parent system is "triggered" at 10ms rate, the child system is never going to be able to run at 4s rate. Without special processing (saving states maybe), every time the parent system is triggered, states are reset.
Make it a system running at a regular 10ms sample rate, specify the child system running at regular 4s sample rate.
댓글 수: 2
Fangjun Jiang
2020년 7월 13일
Right click the subsystem block, select Block Parameters (subsystem)
check "treat as atomic unit"
Specify the sample time (0.01s for parent subsystem and 4s for child subsystem)
참고 항목
카테고리
Help Center 및 File Exchange에서 Schedule Model Components에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!