Tracing signal with script

11 visualizzazioni (ultimi 30 giorni)
Hammad
Hammad il 29 Apr 2020
Commentato: Wei il 28 Mar 2024
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

Risposte (1)

Le Wang
Le Wang il 16 Dic 2020
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 Commenti
Le Wang
Le Wang il 12 Ago 2021
Hi,
This feature will be shipped in MATLAB 2021b.
Thanks,
Le
Wei
Wei il 28 Mar 2024
the function introduced in r21b is sltrace

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by