How to get property of blocks

9 views (last 30 days)
galaxy
galaxy on 17 Dec 2019
Commented: galaxy on 19 Dec 2019
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???

Answers (1)

Fangjun Jiang
Fangjun Jiang on 17 Dec 2019
Assume your model passes model update, here is an example.
vdp;
vdp([],[],[],'compile');
get_param('vdp/Mu','CompiledPortDataTypes')
vdp([],[],[],'term');
  1 Comment
galaxy
galaxy on 19 Dec 2019
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

Sign in to comment.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!