Veristand Integration with Matlab failing: "Unable to find BlockIdx within the GlobalBlockOutput scope"

78 views (last 30 days)
=== Build (Elapsed: 31 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 11.131s
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
=== Build (Elapsed: 20 sec) ===
### Generating code and artifacts to 'Model specific' folder structure
### 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
  5 Comments

Sign in to comment.

Answers (3)

Jordan Calvert
Jordan Calvert on 11 Jul 2023
This error can occur if you are using a version of Matlab/Simulink that is not compatible with the VeriStand Model Framework. Refer to this NI documentation for guidance on version compatibility.

Stefanie Schwarz
Stefanie Schwarz on 29 May 2024
"VeriStand Model Generation Support" is a third-party product that is external to MathWorks.
Please contact NI for any questions:

gao
gao on 5 Jan 2024
you may have a try on changing the NI in block property of Sample time from -1 (default value) to you specific value such as 0.001.

Community Treasure Hunt

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

Start Hunting!