필터 지우기
필터 지우기

Trace Signal Lines without Highlighting

조회 수: 14 (최근 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 CenterFile Exchange에서 DSP Algorithm Acceleration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by