How can I track an output signal back to its input signals?
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello all,
Issue: I have software which contains several software modules. My task is to check for some of the output signals of this software, which input signals could have an influence on these output signals. Best case, would be to have for each relevant output signal a list of the relevant input signals, the blocks which were used and parameters. (In the example the result would be:
Out2
Inputs: In1, In2, In3
Blocks: Switch1, Min/Max
Parameter: 1
Idea: I try to make a script, which starts with the output signal, opens the relevant module (information is available) checks the inputs (blocks, parameter and signals (only Input), writes the information in a list. I repeat this proceedure until I get the 1st level input signals.
Question: Is there any possibility to track a Out signal back to its In signals?
- the highlight function does only look back to the last block.(could probably be used, but I fear my matlab skills are not good enough)
Any hint is highly welcome.
Best regards![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/955685/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/955685/image.png)
0 commentaires
Réponses (1)
Meike Ernst
le 14 Oct 2022
I understand you want to trace the path of a signal back to its origin(s).
If you are using the highlight function, try setting the 'TraceAll' parameter to 'on' when you run the highlight command.
Here's an example from the documentation:
In this example, you open the van der Pol Equation model, and highlight the signal path from Output Port 1 back to its sources.
open_system('vdp')
G = sltrace('vdp/x1', 'Source','Port', 1, 'TraceAll','on');
highlight(G)
If you run this same example but omit setting 'TraceAll' to 'on' (as exemplified by the code below), only the path up to the previous block is highlighted.
open_system('vdp')
G = sltrace('vdp/x1', 'Source','Port', 1);
highlight(G)
Here's the documentation for this example:
Alternatively, if you don't need this to be done programmatically, have you tried the Highlight Signal to Source feature? If not, right-click the signal whose path you want to trace back to the source, and in the context menu, select Highlight Signal to Source. Press CTRL+Left Arrow to highlight all source branches. See the documentation for more information:
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!