How to get property of blocks

8 次查看(过去 30 天)
galaxy
galaxy 2019-12-17
评论: galaxy 2019-12-19
Hi bros,
I want to know how to get property of blocks such as inport (value, data type), outport (value, data type).
Example: Following is simple model.
abs.PNG
I want to get inport data from Abs block via PortHandle, LineHandle, CompiledPortDataTypes, ext, but i could not.
Are there the way for get it for not only Abs block but also other blocks???

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2019-12-17
Assume your model passes model update, here is an example.
vdp;
vdp([],[],[],'compile');
get_param('vdp/Mu','CompiledPortDataTypes')
vdp([],[],[],'term');
  1 个评论
galaxy
galaxy 2019-12-19
Thank you for your reply.
I know about it, but can not get the value of signal.
So I got RunTimeObject as link. It was OK
Thank you so much

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by