Borrar filtros
Borrar filtros

Cannot find the pointers in my Simulink model, need to remove them for code generation

8 visualizaciones (últimos 30 días)
Hello all,
I am relatively new in the ways of code generation in Simulink and I've run into a problem.
When I try to convert a subsystem to PLC code (CoDeSyS 3.5), Simulink throws the following error:
Error:The model requires pointer type representation. This is not supported by Simulink PLC Coder.
### PLC code generation failed for 'UnderStruct_Mod_V1/Understructure'
I barely understand what a 'pointer type representation' is and I'm sure I've not included the need for pointers on purpose. I have exhausted my google-skills on this problem and honestly have no idea where to look anymore. Could someone please point me in the right direction? Is there a box that I should check or uncheck? Are there some elements in my model that force the use of pointers?
Much appreciated

Respuesta aceptada

Dolf
Dolf el 15 de Mayo de 2024
After some more detective work, I've found the issue. One of my scripts used the Matlab 'Find' function, which is not supported in PLC Code Generation. Apparently, this caused the pointer type error.

Más respuestas (1)

Poorna
Poorna el 15 de Mayo de 2024
Hi Dolf,
I see you are trying to use the PLC coder but couldn't generate PLC code. The error says that the model requires pointer type representation. Unfortunately, PLC coder has a restriction on pointer data types and does not support them. You might want to redesign your model to account for this.
Refer to the following documentation on Structured Text Code generation limitations:
Hope this Helps!
  1 comentario
Dolf
Dolf el 15 de Mayo de 2024
Hello Poorna,
Unfortunately, I couldn't solve the problem with the information provided. I know I need to redesign my model, but I cannot figure out what to change. I have a very similar model that generates PLC-code just fine.
I've divided my model in different sections to try and pinpoint which section is causing trouble and have managed to bring it down to this:
Does this provide more information for finding my problem, perhaps?

Iniciar sesión para comentar.

Categorías

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

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by