Can't add any code with the consistency check script in the InitFcn callback

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't add any code with the consistency check script in the InitFcn callback

460 Views
mazzinsherif
Contributor I

Hello I have a simple issue that I couldn't find any workaround for it. Any line of code I add to the InitFcn Callback - before or after - gets deleted once I simulate or generate code and just leaves behind the line "mbd_mpc_consistency_checks(bdroot(gcs));".

The line of code is simple as well, as shown in the screenshot below.

 

Capture.PNG

If anybody came across such thing that would be great help.

Thank you.

0 Kudos
1 Reply

439 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @mazzinsherif ,

Sorry for answering you so late. This is a behaviour we have noticed as well, and in order to avoid this, you have to replace the attached p file.

To do so, please type in the matlab Command Window the following command:

winopen(fullfile(mbd_find_mpc_root, 'mbdtbx_mpc','mscripts','config'))

This will open Windows Explore, whre you have to replace the mbd_mpc_set_tmf. 

Hope this helps,

Marius

0 Kudos