Simulink: Obtaining propagated signal names programmatically

Hi, I am trying to obtain the propagated signal name for a signal programmatically. For example:
porthandles = get(gcbh, 'PortHandles');
linehandle = get(porthandles.Outport(1), 'Line');
%Assume that the SignalPropagation property is turned off
%As soon as the command below is executed, the name '<PropagatedName>' appears
%on the line in the Simulink model
set(linehandle, 'SignalPropagation', 'all');
Now, is there a property associated with linehandle that lets us obtain this propagated signal name? The 'Name' property returns an empty string.
Thanks.

 採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 12 月 14 日

2 投票

get(porthandles.Outport(1),'PropagatedSignals')

4 件のコメント

vaibhav hosur
vaibhav hosur 2016 年 1 月 22 日
Can we check whether the propogation is above the line or below the line?
Lukas
Lukas 2019 年 8 月 13 日
This worked for me:
porthandles = get(gcbh, 'PortHandles');
for ip = 1:numel(porthandles.Inport)
linehandle = get(porthandles.Inport(ip), 'Line');
srchandle = get(linehandle,'SrcPortHandle');
disp(get(srchandle,'PropagatedSignals'));
end
Praveen Kumar
Praveen Kumar 2020 年 5 月 11 日
Hi Lukas,
Is it possible to change the propagated signal. if yes, please tell me the way(programmatically).
Fangjun Jiang
Fangjun Jiang 2020 年 5 月 11 日
The signal label is "propagated" so can't be modified at downstream. If you want to change the signal label, change it at its source or simply name it something else directly.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

質問済み:

sst
2011 年 12 月 12 日

コメント済み:

2020 年 5 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by