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?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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
Respuesta aceptada
MathWorks Support Team
el 27 de Jun. de 2009
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Target Language Compiler en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!