MATLAB Answers

sst
0

Simulink: Obtaining propagated signal names programmatically

Asked by sst
on 12 Dec 2011
Latest activity Commented on by Lukas
on 13 Aug 2019
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.

  0 Comments

Sign in to comment.

1 Answer

Answer by Fangjun Jiang
on 14 Dec 2011
 Accepted Answer

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

  2 Comments

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

Sign in to comment.