필터 지우기
필터 지우기

Error: Simulink does not support the execution of function-call cycles

조회 수: 7 (최근 30일)
Guilherme T Silva
Guilherme T Silva 2017년 1월 23일
댓글: Guilherme T Silva 2017년 2월 6일
I'm trying to execute this very simple sender/receiver logic with two charts and function calls. The issue is that Simulink detects a loop due input/output dependencies.
How can I solve this loop, since I can't use memory blocks with function call signals?

답변 (1개)

Saurabh Gupta
Saurabh Gupta 2017년 1월 31일
As the error suggests, function call cycles are not supported in Simulink. So you will have to modify your design to avoid creating a function call cycle.
If I understand correctly, you wish to model a sender and a receiver operating as per a certain clock, and you want certain state transitions in both sender and receiver to be interdependent on each other. You can create one Stateflow chart having two parallel states (one each for sender and receiver). You can then utilize the common clock signal event in combination with the internal events generated by the these states to perform transitions in their sub-states.
Refer to the following documentation pages for the related concepts.
https://www.mathworks.com/help/stateflow/ug/states.html
https://www.mathworks.com/help/stateflow/ug/execution-order-for-parallel-states.html
https://www.mathworks.com/help/stateflow/ug/parallel-and-state-examples.html
  댓글 수: 1
Guilherme T Silva
Guilherme T Silva 2017년 2월 6일
This is a very simple example, but my real application is a bit more complex. In that application, the logic for sender and receiver is encapsulated separately inside different subsystems, so using parallel states in a single chart won't be possible in that scenario.
Any other insight? I'd like to avoid using boolean-typed events, since the code generation for event triggering is not as clean as calling functions.

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

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by