Trace Signal Lines without Highlighting

12 ビュー (過去 30 日間)
Robert
Robert 2013 年 12 月 18 日
編集済み: Rick Gijsberts 2024 年 4 月 5 日
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 件のコメント
Sanat
Sanat 2015 年 4 月 9 日
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 :)

サインインしてコメントする。

回答 (3 件)

Sushovan Basu
Sushovan Basu 2016 年 8 月 8 日
I am looking for the same. Any luck guys?
  3 件のコメント
Timon Eßlinger
Timon Eßlinger 2016 年 11 月 24 日
Well, now I have the same problem with the flickering gui. How did you solved the problem? I am using also the 'TraceDestinationInputPorts' options.
Robert Rasche
Robert Rasche 2017 年 11 月 22 日
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.

サインインしてコメントする。


Le Wang
Le Wang 2020 年 12 月 16 日
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 件のコメント
Robert Rasche
Robert Rasche 2020 年 12 月 17 日
> 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.

サインインしてコメントする。


Rick Gijsberts
Rick Gijsberts 2024 年 4 月 5 日
編集済み: Rick Gijsberts 2024 年 4 月 5 日
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

カテゴリ

Help Center および File ExchangeDSP Algorithm Acceleration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by