Why do I get an "Attempt to call a non-function value" error when implementing the example TLC script in the Real-Time Workshop 6.5 (R2006b) documentation?

조회 수: 18 (최근 30일)
The example TLC script given in the "Real-Time Workshop > Target Language Compiler > Code Generation Architecture > Code Generation Concepts > Records" section of the documentation should loop through a model and output the name of each block in the model. However, when I use the script I receive the following error:
Attempt to call a non-function value: IsModelReferenceSimTarget
Error: File: W:/archive/R2006b/perfect/matlab/rtw/c/tlc/lib\utillib.tlc Line: 2268 Column: 47
Breakpoint conditions must evaluate to a boolean result.
Error: File: W:/archive/R2006b/perfect/matlab/rtw/c/tlc/lib\utillib.tlc Line: 2268 Column: 22
Attempt to call a non-function value: IsModelReferenceSimTarget
Error: File: W:/archive/R2006b/perfect/matlab/rtw/c/tlc/lib\utillib.tlc Line: 2268 Column: 47
Breakpoint conditions must evaluate to a boolean result.
??? Error: File: W:/archive/R2006b/perfect/matlab/rtw/c/tlc/lib\utillib.tlc Line: 2268 Column: 22
Attempt to call a non-function value: IsModelReferenceSimTarget

채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일
This bug has been fixed in Release 2007a (R2007a). For previous product releases, read below for any possible workarounds:
This is a bug in the Real-Time Workshop 6.5 (R2006b) documentation. The script that outputs the name of each block in a model should actually be as follows:
%addincludepath "matlabroot/rtw/c/tlc/lib"
%addincludepath "matlabroot/rtw/c/tlc/mw"
%addincludepath "matlabroot/rtw/c/tlc/blocks"
%assign Accelerator = 0 %%Needed to avoid error in utillib
%include "utillib.tlc"
%include "modelrefutil.tlc" %%Needed to avoid error in utillib
%selectfile STDOUT
%with CompiledModel
%foreach sysIdx = NumSystems
%assign ss = System[sysIdx]
%with ss
%foreach blkIdx = NumBlocks
%assign block = Block[blkIdx]
%<LibGetFormattedBlockPath(block)>
%endforeach
%endwith
%endforeach
%endwith

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Target Language Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by