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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

465 次查看
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 项奖励
1 回复

444 次查看
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 项奖励