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

Can we check whether the propogation is above the line or below the line?
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
Hi Lukas,
Is it possible to change the propagated signal. if yes, please tell me the way(programmatically).
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 Exchange에서 Simulink 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