Trace Signal Lines without Highlighting
9 次查看(过去 30 天)
显示 更早的评论
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
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
2016-8-8
I am looking for the same. Any luck guys?
3 个评论
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
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
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
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
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 DSP Algorithm Acceleration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!