Is it possible to make input or output ports in Simulink to automatically take the name of the signal?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is it possible to make input or output ports in Simulink to automatically take the name of the signal?
So for example, I have a signal name of "test_input". Is there a way for Matlab to retrieve the signal name? I guess to set the port name we can just use set_param.
0 Kommentare
Akzeptierte Antwort
TAB
am 3 Jul. 2012
There is a ConnectionCallback function which can be implemented for the port of the blocks. This callback is triggered every time connectivity to the port is changes.
Implement this callback for your input and output ports. Inside the callback, you can write the code to get the signal name to which port is connected using get_param() and set the port name using set_param().
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!