Simulink coder TwinCAT issue

10 ビュー (過去 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 件のコメント
Hedayatullah Fiazi
Hedayatullah Fiazi 2022 年 8 月 2 日
same problem

サインインしてコメントする。

回答 (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 Center および File ExchangeSimulink Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by