필터 지우기
필터 지우기

Why do I recieve the error the model referenced by it contains a block that updates persistent or state variables while computing outputs and is not supported in an algebraic

조회 수: 104 (최근 30일)
Hello Everyone.
I want to generate the C code of ISReferrence ,which is the example of Vehicle Dynamic Blockset. But I recieve the error
'ISReferenceApplication/Driver Commands/Driver Commands/Longitudinal Driver/Longitudinal Driver/Longitudinal Driver/Shift/Scheduled/Shift Controller' or the model referenced by it contains a block that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. It is in an algebraic loop with the following blocks.
My Type is Fixed-step,ODE4, Solver is ODE4.
What should I do to generate C/C++ code?

답변 (1개)

Deepak Chaware
Deepak Chaware 2022년 11월 16일
You could work around this error by introducing a delay to the outputs of the Stateflow chart with the "memory" block. The memory block outputs the input from the previous time set. This single-step delay breaks the algebraic loop, and eliminates the source of the error.

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by