Simulink coder TwinCAT issue

10 visualizaciones (últimos 30 días)
Soroush Azarian
Soroush Azarian el 6 de Abr. de 2022
Respondida: Chetan el 29 de Dic. de 2023
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

Respuestas (1)

Chetan
Chetan el 29 de Dic. de 2023
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 !

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by