Tracing signal with script

I am trying to trace output signals of one subsystem ('mySubsystem' for example) to see in which other subsystems those output signals are used. I tried using PortConnectivity to find the destination block but it stops if there is a bus involved in signal tracing and gives that bus block as destination. If I use 'Highlight signal to Destination', it highlights the signal till the final place of use of that signal and does not stop at bus or outport. I am looking to get similar output with my script. Thanks!
Here is the example script i am using which does not give the final destination but stops at first bus/outport it sees.
PortCon=get_param(mySubsystem,'PortConnectivity')
DstBlock=getfullname(PortCon(2).DstBlock) %for getting DstBlock for port 2 signal

回答(1 个)

Le Wang
Le Wang 2020-12-16

0 个投票

Hi Muhammad,
The 'PortConnectivity' only leads you to the next immediate port the original port is connecting with. This is why it stops at the bus block instead of the real destination.
The 'Highlight signal to Destination' feature involves more complicated searching algorithm under the hood. The development teams are aware of this request. Signal tracing command-line API is under development and will be shipped in future release.

3 个评论

I would like to know when will the signal tracing command API will be released and in which version of matlab is it expected.
Hi,
This feature will be shipped in MATLAB 2021b.
Thanks,
Le
the function introduced in r21b is sltrace

请先登录,再进行评论。

类别

提问:

2020-4-29

评论:

Wei
2024-3-28

Community Treasure Hunt

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

Start Hunting!

Translated by