Trace Signal Lines without Highlighting

I'm working on a model-modification script that must follow signal flow through the model in order to locate certain blocks that need changing. I'm currently using the undocumented get_param feature "TraceSourceOutputPort" and "TraceDestinationInputPort", because their functionality fits these needs quite fine: it traverses nicely through all aspects of pure signal-routing like subsystem-levels, goto/from, bus or mux packing/unpacking).
However, due to the often excessive use of hierarchy and sheer size of those models i'm dealing with, it's considerable pain to see this function also visually highlight all the things it comes across. Subsystem windows pop up, the model-hierarchy view flickers with visual updates and i'm left with arbitrary remains of highlighted signal lines and blocks. Therefore i'm now looking into replacing the tracing part of my script with something more 'silent', i.e. something that only returns the port handles without any gui-updates.
I've already searched the webs, but all i can seem to find is the undocumented TraceDestinationInputPorts and TraceDestinationOutputPorts. But those do highlight the blocks and wires exactly as the "Highlight To Source/Destination" GUI Action would.
Is there an easy solution available to this, that i'm overlooking?
thanks, kind regards
Robert Rasche
i'm using MATLAB 7.11.2 right now, but the switch to 2013a is also planned.

1 Comment

I am looking for exactly the same. I see it's been more than a year, just wondering if you figured this one out already :)

Sign in to comment.

Answers (3)

I am looking for the same. Any luck guys?

3 Comments

Well, i think i ended up creating a custom routine for my purposes. After some trial, i managed to make it behave almost as well as Trace<X>Ports - only of course faster.
Well, now I have the same problem with the flickering gui. How did you solved the problem? I am using also the 'TraceDestinationInputPorts' options.
its me (Robert), from the future.
if you're still pondering this issue, have a look at
https://github.com/arinar/slQuery
In there is a `follow`-subroutine, that can find all dataflow-connected non-virtual counterparts to any block port handle like so.
ph = get_param(my_block, 'PortHandles');
dest = slQuery.follow(ph.Outport(1), {}, [], false);
Additional arguments are for the recursive invocations of this.
Maybe you could also try out the querying method that slQuery gives you.

Sign in to comment.

Le Wang
Le Wang on 16 Dec 2020
Hi,
Simulink has a signal tracing feature. Please check the below link to understand more about signal tracing.
And signal tracing command-line API is under development, which can return tracing results, e.g., blocks, and have options to turn of highlighting.

1 Comment

> signal tracing command-line API is under development, which [...] have options to turn of highlighting
This is good news. I'm looking forward to this feature.
The link you posted though, is just a description of the usual "signal-tracing via GUI"-feature, which admittedly, can do much more than it could a few years ago. But still, no option to make the process "silent/invisible" is described.

Sign in to comment.

GOcontroll
GOcontroll on 5 Apr 2024
Edited: GOcontroll on 5 Apr 2024
If anyone is still looking for this see this page: https://nl.mathworks.com/help/simulink/slref/sltrace.html
I'm not sure if goes through goto and from blocks but it works very well

Products

Asked:

on 18 Dec 2013

Edited:

on 5 Apr 2024

Community Treasure Hunt

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

Start Hunting!