I am trying to export a FMU from a Simulink model containing the "CAN Unpack", "CAN Receive" and "CAN configure" blocks:
Setup: MATLAB r2021b with Vehicle Network Toolbox and FMIKit 3.0
Whereas the code generation with "grt.tlc" is successful, the code generation with "grtfmi.tlc" produces the error:
Generating code and artifacts to 'Model specific' folder structure
Invoking Target Language Compiler on Read_CAN_simple.rtw
Using System Target File: C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmi.tlc
Loading TLC function libraries
Initial pass through model to cache user defined code
Caching model source code
Writing header file Read_CAN_simple_types.h
Writing header file Read_CAN_simple.h
Writing header file rtwtypes.h
Writing header file multiword_types.h
Writing source file Read_CAN_simple.c
.
Writing header file Read_CAN_simple_private.h
Writing header file rtmodel.h
Writing source file Read_CAN_simple_data.c
TLC code generation complete.
Writing modelDescription.xml
Error: File: C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmixml.tlc Line: 47 Column: 41 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix Main program: ==> [00] C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmixml.tlc:<NONE>(47)
I solved it exporting the Simulink model as FMU without CAN boxes, and then extending the Master-Alg -in my case a Python script- with a Python CAN module.
Hello,
I am trying to export a FMU from a Simulink model containing the "CAN Unpack", "CAN Receive" and "CAN configure" blocks:
Setup: MATLAB r2021b with Vehicle Network Toolbox and FMIKit 3.0
Whereas the code generation with "grt.tlc" is successful, the code generation with "grtfmi.tlc" produces the error:
Generating code and artifacts to 'Model specific' folder structure Invoking Target Language Compiler on Read_CAN_simple.rtw Using System Target File: C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmi.tlc Loading TLC function libraries Initial pass through model to cache user defined code Caching model source code Writing header file Read_CAN_simple_types.h Writing header file Read_CAN_simple.h Writing header file rtwtypes.h Writing header file multiword_types.h Writing source file Read_CAN_simple.c . Writing header file Read_CAN_simple_private.h Writing header file rtmodel.h Writing source file Read_CAN_simple_data.c TLC code generation complete. Writing modelDescription.xml
Error: File: C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmixml.tlc Line: 47 Column: 41 The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix Main program: ==> [00] C:\MATLAB\FMIKit-Simulink-3.0\grtfmi\grtfmixml.tlc:<NONE>(47)
Could you please help on that? Thank you[](url)