MBD Toolbox - Simulink error

cancel
Showing results for 
Search instead for 
Did you mean: 

MBD Toolbox - Simulink error

646 Views
federico_madona
Contributor I

Hi, 

I am trying to run the Model Based Design Toolbox for s32k family. I correctly installed the toolbox into my Matlab 2019b. I set the license and the compiler, and tried to simulate an example to check everything works fine. I tried with SIL simulation, in particular the sine wave generation. Code generation works fine, but simulation is stopped with this message Shot.PNGI cannot understand the meaning of the message. Any ideas? 

Thanks in advance, 

Federico

0 Kudos
13 Replies

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it ,

Can you share the model you are using? It would be easier to get to the bottom of this issue if I could reproduce your issue.

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

Hello constantinrazvan.chivu‌, 

As proposed in the Quick Start guide to the toolbox, I tried opening the mbd_s32k_examples.mdl found in the folder. Cattura.PNG

From there, I opened the SIL block, and then the AMMCLIB sinusoidal signal generation.

pastedImage_4.png

When running the model, the code generation seems to work quite fine, but simulation stops with the error above. Is this the model you been asking about?

0 Kudos

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it,

Can you run the following commands in the MATLAB terminal and share their output?

mex -setup

and

ver

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

As for the compiler, I am only using MinGW64

pastedImage_1.png

As for the versions, here is all

pastedImage_2.png

pastedImage_3.pngI just noticed that the MBD Toolbox is versioned R2017b-2019a, do I need to install an erlier version of Matlab?

0 Kudos

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it ,

When we released our toolbox, the latest version of MATLAB was 2019a - this is why you're seeing that in the ver command output. It should be fine on 2019b, I even tested on R2020a, and it still works on my end, with the same version of our toolbox, same compiler as your. This being said, you don't need to install an earlier version of MATLAB.

I will continue to investigate this and come back to you - just to make sure: you did not change any other options on the model - just opened it and hit the run simulation button, right?

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

That's right. Just opened and ran the model as said in the Quick start guide.

0 Kudos

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it,

Unfortunately I could not replicate your issue yet -- the only thing I am suspecting right now is the length of your path. In this regard, I have tried different path lenghts, and depending on that it will crash in different places. The explanation is simple - let's take a few examples: if you open a model, the path to the model itself can be too long, and the model could not be opened. If that is good, if you build the model, the path to the compiler might be too long for example. You can expand to many more use-cases this way.

This being said, my advice would be to make a clean install of the toolbox in another place, with a shorter path. Please let us know if this fixes your issue.

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

Hello constantinrazvan.chivu‌, 

Thank you for the suggestion. When I try to reinstall the toolbox via MATLAB, it does not allow me to choose the installation directory. Is there a way in which I can manage the installation folder? 

0 Kudos

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it ,

Yes, you can go to Preferences -> MATLAB -> Add-Ons -> Instalation Folder and set it there. This will now be the default folder where all your additional toolboxes are installed.

pastedImage_3.png

pastedImage_2.png

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

Hello constantinrazvan.chivu‌, 

I tried reinstalling the toolbox in a different path, but still the same error appears. Is it possible that the operative system does not allow the correct running of the example models?

0 Kudos

406 Views
constantinrazva
NXP Employee
NXP Employee

Hello federico.madona@e-novia.it ,

Not sure what to say here - we have not encountered this issue before and I wasn't able to reproduce it until now. Can you send me the whole output of the ver command (from MATLAB terminal) ? I'll try and replicate your exact setup. Moreover, can you also attach a text file with the contents of your MATLAB path? You can get it by typing path into the MATLAB terminal.

Kind regards,

Razvan.

0 Kudos

406 Views
federico_madona
Contributor I

Hello constantinrazvan.chivu‌, 

I attach the screenshot you asked me. 
pastedImage_1.png

pastedImage_2.png

You can find the path.txt file attached to the message. Thank you very much

0 Kudos

406 Views
dumitru-daniel_
NXP Employee
NXP Employee

Just make sure the path does not contains "white spaces". MATLAB coders do not like that :-)

0 Kudos