- Increase the heap size by modifying "TcRegistry.xml". The directory of the mentioned file is TwinCat/3.1/Runtimes/UmRT_Default/3.1;
- Modify the TcRegistery as followsand run the "Start" file in the directory TwinCAT/3.1/Runtimes/UmRT_Default<Key Name="System"><Value Name="RunAsDevice" Type="DW">1</Value><Value Name="HeapMemSizeMB" Type="DW">65536</Value><Value Name="AmsNetId" Type="BIN">C0A804010101</Value></Key>
- Finally, within the TwinCat app, "SYSTEM/Real-Time" you should increase the Router memory from the default value (32 MB) to 512 MB.
How can I increase heap memory on TwinCAT hardware to deploy my model using Simulink Compiler?
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 3 de Ag. de 2023
Respondida: MathWorks Support Team
el 4 de Ag. de 2023
I am trying to deploy my Simulink model to TwinCAT external hardware with Simulink Compiler. I can build the model successfully, however I get the following warning when increasing the duration from 120000s to 240000s:
Not enough memory on the target to process the packet.
How can I workaround this issue?
Respuesta aceptada
MathWorks Support Team
el 3 de Ag. de 2023
The root cause of this issue is that increasing the “Duration” allows the capture of large real-time buffers. These buffers use heap section to allocate memory. A high value of “Duration” may result in "Not enough memory on the target to process the packet" warning, and consequently cause no data to be uploaded from the target to the host computer. The current workaround would be to increase the heap memory to satisfy this request from the code generated, using the following steps:
Please refer to this documentation for further details on increasing the heap memory on your target hardware: https://infosys.beckhoff.com/english.php?content=../content/1033/twincat_bsd/12456112011.html&id=
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Application Deployment en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!