필터 지우기
필터 지우기

Simulink coder TwinCAT issue

조회 수: 8 (최근 30일)
Soroush Azarian
Soroush Azarian 2022년 4월 6일
답변: Chetan 2023년 12월 29일
am trying to compile a S-function based model into Twincat object and I am getting the follwoing error. has anyone encountered the similar issue? Top model targets built: Mode
Top model targets built: Model Action Rebuild Reason ============================================================================= ConverterModelDUT Failed Code generation information file does not exist. 0 of 1 models built (0 models already up to date) Build duration: 0h 0m 5.212s
The call to TwinCatGrt_make_rtw_hook, during the after_make hook generated the following error: Dot indexing is not supported for variables of this type. The build process will terminate as a result.
Caused by:
  • Dot indexing is not supported for variables of this type.
Component:Simulink | Category:Block diagram error

답변 (1개)

Chetan
Chetan 2023년 12월 29일
I Understand that you are facing an issue with the Simulink Coder TwinCAT target within MATLAB R2018b. The challenge seems to originate from the S-Function target generation process, involving a custom TMF that lacks a declaration for a mex file-compatible toolchain.
To begin addressing this, ensure the `tccert` file is correctly named:
File Naming and Location Verification:
  • Check that the `tccert` file has the correct name and is located in the directory MATLAB expects.
File Name Modification:
  • If necessary, rename the `tccert` file to conform to MATLAB's expected naming structure.
For more information you can refer the following MathWorks Documentation here:
If you are utilizing a version of MATLAB that predates R2018b, you may consider this as workaround:
1. Custom Toolchain Creation: Construct a custom toolchain derive it from MinGW64, but ensure the build actions are set to do nothing.
2. Toolchain Naming: Preface your custom toolchain's name with 'MinGW64' to sidestep any build issues within MATLAB.
3. Toolchain Registration: Register your new custom toolchain in MATLAB using the `coder.make.getToolchainInfoFromRegistry` function.
4. Toolchain Implementation: Adjust your model settings to build with the newly created custom toolchain.
Below is an example of how to register your custom toolchain:
tcInfo = coder.make.getToolchainInfoFromRegistry('YourCustomToolchain');
tcInfo.Name = ['MinGW64 ', tcInfo.Name];
Hope it helps !

카테고리

Help CenterFile Exchange에서 Build Configuration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by