Trying to convert Simulink model into dll format to integrate it in VeriStand , upon building the simple code I am getting below errors. How can I resolve these error?
14 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
### Generating code and artifacts to 'Model specific' folder structure
I I have simple model which is - input *Gain=ouput, I even tried A+b=c
and then using taget file as NIVeristand.tlc and building the code.
after building I am getting below error-
### Generating code into build folder: C:\Windows\System32\trial123_niVeriStand_rtw
Warning:Source 'trial123/NIVeriStand In1' specifies that its sample time (-1) is back-inherited. You should explicitly specify the sample time of sources. You can disable this diagnostic by setting the 'Source block specifies -1 sample time' diagnostic to 'none' in the Sample Time group on the Diagnostics pane of the Configuration Parameters dialog box.
### VeriStand 2021.0.0.0 (2021) code generation started
### Invoking Target Language Compiler on trial123.rtw
### Using System Target File: C:\VeriStand\2021\ModelInterface\tmw\target\NIVeriStand.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing header file trial123_types.h
### Writing header file trial123.h
### Writing header file rtwtypes.h
### Writing header file builtin_typeid_types.h
.
### Writing header file multiword_types.h
### Writing header file zero_crossing_types.h
### Writing source file trial123.c
### Writing header file trial123_private.h
### Writing header file rtmodel.h
### Writing source file trial123_data.c
.
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rt_defines.h
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rtGetNaN.h
.
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Generating TLC interface API.
### VeriStand 2021.0.0.0 (2021) Modifying source file trial123.c
.
Error: File: C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 55
Unable to find BlockIdx within the GlobalBlockOutput scope
Main program:
==> [00] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34)
[01] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(115)
[02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276)
[03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiSignalLib.tlc:NiSignalsMapping(135)
[04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(445)
Error: File: C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 64
The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix
Main program:
==> [00] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34)
[01] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(115)
[02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276)
[03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiSignalLib.tlc:NiSignalsMapping(135)
[04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(445)
Error: File: C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 74
Unable to find BlockIdx within the GlobalBlockOutput scope
Main program:
==> [00] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34)
[01] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(115)
[02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276)
[03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiSignalLib.tlc:NiSignalsMapping(135)
[04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(445)
Error: File: C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 83
The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix
Main program:
==> [00] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34)
[01] C:\Program Files\MATLAB\R2022a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(115)
[02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276)
[03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiSignalLib.tlc:NiSignalsMapping(135)
[04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(445)
### Aborted due to an error in the build procedure for model: trial123
Top model targets built:
Model Action Rebuild Reason
====================================================================
trial123 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 18.998s
Error:Error: File: C:\Program Files\MATLAB\R2022a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 42 Column: 50
Unable to find BlockIdx within the GlobalBlockOutput scope
=== Build (Elapsed: 3 sec) ===
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: C:\Windows\System32\trial123_niVeriStand_rtw
### Aborted due to an error in the build procedure for model: trial123
Top model targets built:
Model Action Rebuild Reason
====================================================================
trial123 Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 3.304s
Error:Error in 'trial123/NIVeriStand In1' while executing C MEX S-function 'NIVeriStandIO', (mdlInitializeSampleTimes), at time 0.0.
Caused by:
Changing property 'InheritedTsInSrcMsg' is not allowed
1 Kommentar
Antworten (1)
Shivang
am 21 Dez. 2023
Hi Ashwini,
From what I understand, you are working with a custom .tlc file supplied by NI, and running into errors while building your model.
The version of Veristand you're using (2021) is not compatible with MATLAB R2022a. Refer to this NI documentation for guidance on version compatibility: https://www.ni.com/en/support/documentation/compatibility/22/veristand-labview-modeling-and-legacy-simulink-modeling-version-.html
Hope this helps.
-Shivang
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!