error: Unable to find BlockIdx within the ExternalInput scope
44 views (last 30 days)
Show older comments
NI Veristand.tlc를 사용하기 위해 그에 맞는 버전을 설치(2021a, veristand2021R3,labview2021, veristand model generation support 1.2)
하였고,
명령창에
>> addpath('C:\VeriStand');
NIVeriStandAddPaths;
VeriStand 2021 Model Framework
### Successfully initialized components
>>
이런식으로 명령을 내렸고
simulink에서 C code의 세팅에 들어가 NI veristand.tlc, C++를 적용한 뒤 "Build"를 눌러 확인한 결과
검색
veristand_test
모델 불러오기
1
01:28 오후 경과 시간: 0.18 초
빌드
1
01:30 오후 경과 시간: 2 초
빌드
1
01:30 오후 경과 시간: 0.255 초
빌드
3 1 1
01:30 오후 경과 시간: 9 초
최상위 모델 빌드
2 1
경과 시간: 6 초
타깃 정의가 모델에 있는 정의와 다릅니다. 새 정의에 따라 타깃을 업데이트하는 중입니다. 다음 파라미터가 업데이트되었습니다. Type definition ### Generating code and artifacts to '모델별' folder structure ### Generating code into build folder: C:\Users\user\Desktop\분산전원\veristand_test_niVeriStand_Linux_64_rtw
Root level output logging in 'Dataset' format is not supported in this simulation or code generation mode for model 'veristand_test'. No data will be logged.
제안된 조치
Set 'Format' to 'Array', 'Structure', or 'Structure with time' to log root level output data열기
Clear 'Output' to disable logging root level output data열기
구성요소: Simulink | 범주: Block diagram 경고
### VeriStand 2021.0.0.0 (2021) code generation started ### Invoking Target Language Compiler on veristand_test.rtw ### Using System Target File: C:\VeriStand\2021\ModelInterface\tmw\target\NIVeriStand_Linux_64.tlc ### Loading TLC function libraries ### Generating TLC interface API for custom data ### Initial pass through model to cache user defined code . ### Caching model source code ### Writing header file veristand_test_types.h ### Writing header file veristand_test.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 veristand_test.cpp . ### Writing header file veristand_test_private.h ### Writing header file rtmodel.h ### Writing source file veristand_test_data.cpp ### Writing header file rt_nonfinite.h ### Writing source file rt_nonfinite.cpp ### Writing header file rt_defines.h . ### Writing header file rtGetInf.h ### Writing source file rtGetInf.cpp ### Writing header file rtGetNaN.h ### Writing source file rtGetNaN.cpp ### TLC code generation complete. ### Generating TLC interface API. ### VeriStand 2021.0.0.0 (2021) Modifying source file veristand_test.cpp Error: File: C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 53 Unable to find BlockIdx within the ExternalInput scope Main program: ==> [00] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34) [01] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(117) [02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276) [03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiPortLib.tlc:NiInputsProcessing(90) [04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(412) Error: File: C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 62 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix Main program: ==> [00] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34) [01] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(117) [02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276) [03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiPortLib.tlc:NiInputsProcessing(90) [04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(412) Error: File: C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 72 Unable to find BlockIdx within the ExternalInput scope Main program: ==> [00] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34) [01] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(117) [02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276) [03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiPortLib.tlc:NiInputsProcessing(90) [04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(412) Error: File: C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 34 Column: 81 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix Main program: ==> [00] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc:LibGrSrcExists(34) [01] C:\Program Files\Polyspace\R2021a\rtw\c\tlc\public_api\utils_api.tlc:LibGetBlockPath(117) [02] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiUtilityLib.tlc:NiLibGetBlockPath(276) [03] C:\VeriStand\2021\ModelInterface\tmw\codegen\NiPortLib.tlc:NiInputsProcessing(90) [04] C:\VeriStand\2021\ModelInterface\tmw\codegen\NIVeriStand_codegen.tlc:<NONE>(412) ### Aborted due to an error in the build procedure for model: veristand_test
빌드 요약
1
경과 시간: 0.36 초
빌드된 최상위 모델 타깃: 모델 동작 재빌드 이유 ============================================= veristand_test 실패 코드 생성 정보 파일이 존재하지 않습니다. 1개 모델 중 0개 빌드됨(0개 모델이 이미 최신 상태임) 빌드 소요 시간: 0h 0m 8.223s
Error: File: C:\Program Files\Polyspace\R2021a\rtw\c\tlc\private_api\utility_private_api.tlc Line: 42 Column: 48 Unable to find BlockIdx within the ExternalInput scope
이런 오류가 나왔습니다. 어떤 해결방법이 있을까요?
명령은 간단한 input 1, gain 1, output 1을 주었습니다.
0 Comments
Answers (1)
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.
0 Comments
See Also
Categories
Find more on 모델 입력 및 출력 준비하기 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!