Matlab function inside simulink takes forever to compile

48 visualizzazioni (ultimi 30 giorni)
Mohamed
Mohamed il 29 Ott 2024 alle 6:44
Commentato: Remo Pillat il 5 Nov 2024 alle 21:54
I have a simulink model where I am using a matlab function inside of to calculate the inverse kinematics of a CNC machine but whenever I click "Run" the progress bar on the bottom gets stuck at the part where it is compling the matlab function for almost 5 hours and sometimes just ends up filling my laptop's memory and crashing the app, I am not sure how I can even start at tackling this. any suggestions? thanks in advance.
  2 Commenti
Aravind
Aravind il 29 Ott 2024 alle 6:49
Could you share the simulink model file that is causing this issue? That will help in identifying and debugging the issue. Additionally, could specify on which operating system you are facing this issue.
Remo Pillat
Remo Pillat il 5 Nov 2024 alle 21:54
@Mohamed, can you please share the MATLAB function you are using that causes the long compilation time? Also, have you tried using the dedicated Inverse Kinematics block from Robotics System Toolbox for solving your IK problem in Simulink?

Accedi per commentare.

Risposte (1)

Brahmadev
Brahmadev il 4 Nov 2024 alle 8:49
To help debug the issue effectively, please try the following steps, which may assist in identifying the specific block or simulation setting causing the issue:
  1. Review Diagnostics: Check the diagnostics window for any errors or warnings that might provide clues to the issue.
  2. Isolate Components: Test the S-Function blocks or MATLAB Function blocks individually, without other blocks, to see if the issue persists. You can do this by giving sample data as information.
  3. Adjust Solver Settings: Experiment with different solver settings and verify block parameters like sample time.
  4. Test with Examples: Compare your workflow and block usage against MathWorks examples. If the issue occurs with those examples, it might provide insight into the underlying cause.
Please share additional information regarding the model and the issue to help understand the issue better. I hope this helps!

Categorie

Scopri di più su Robotics System Toolbox in Help Center e File Exchange

Prodotti


Release

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by