Simscape PreCopyFcn prevents simulation running when in referenced model
10 次查看(过去 30 天)
显示 更早的评论
A colleague has created a Simscape simulation of a Plant using hydraulic components (he has the full suite, I just have Simscape and the associated libraries installed).
I can run his model OK if I treat it as standalone (it runs in Restricted mode). However, when I include his Plant model as a referenced model in a whole system simulation it fails to run:
Error evaluating 'PreCopyFcn' callback of Check Valve block (mask)
When I open the block's callbacks they are all greyed out so I cannot see the callback. However, I can reveal it programatically :
>> get_param(gcb, 'PreCopyFcn')
ans =
simscape.compiler.sli.internal.callback('PreCopyFcn',gcbh);
So it appears that simply running a referenced model that contains Simscape blocks requires a Copy, and that is a restricted function. But running a simulation containing the same block all by itself is fine... any thoughts on how to overcome this?
PS - I can't even see what happens when I remove the block - Restricted Mode prevents it's deletion too!
PPS - Colleague is on holiday for the next two weeks, so unless I 'administer' his SimHydraulics licence to myself I'm really stuck.
0 个评论
回答(1 个)
Yifeng Tang
2022-6-22
Attempt to answer from 10 years later ... lol.
It sounds to me that it's a feature of Simscape and its Add-On libraries working properly. The restricted mode is designed such that a user with Simscape license can run a model created using Add-On libraries, e.g. Simscape Fluids, but cannot modify what is inside the model. Here is a list of thing you can do in the restricted mode vs full mode:
Hope this helps.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Troubleshooting 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!