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 Center および File ExchangeTarget Language Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by