Matlab signal propagation error

6 views (last 30 days)
Adrian Cristian
Adrian Cristian on 11 Apr 2022
Answered: Fangjun Jiang on 11 Apr 2022
Hello! I have a script in Matlab R2017b that no longer works on Matlab R2020b. It gives me an error in the following section:
lines = find_system(frame_handle, 'FindAll', 'on', 'type', 'line');
for i = 1:length(lines)
set(lines(i), 'signalPropagation', 'on')
The error is:
Error using compare_scalings (line 85)
'ApplicationPath/BusSelector', output port '27', does not
support signal label propagation
The script compares scalings of input and output ports from a path to other scalings of input and output ports from a deeper path into the model.
If I run it, it starts to work for a few minutes, but it compares the frame signals with something called "i_value" (I don't have anywhere in the code anything named like that) and after that it stops and gives an error. I use Matlab R2020b, TargetLink 5.1p1
Any ideas?

Answers (1)

Fangjun Jiang
Fangjun Jiang on 11 Apr 2022
Here is the root cause. It is due to the difference between R2020b and earlier versions. You have to figure out how to deal with it.
The output line of a "Bus Selector" block is not suppose to be able to set its signal name or "SignalPropagation" property, because the signal is "selected" from the bus. It is not meant to create a new signal.
In earlier version (e.g. R2018b), the "SignalPropagation" is set as "off". You can run set(LineHandle,'SignalPropagation','on') command but it has no effect. The property value is still 'off'. The command does not cause an error.
In R2020b, the same command caused the error message you saw.
Possible solution:
  1. Add a "try" "catch" statment to catch the error.
  2. Check the "SourcePort" property, which can tell you it is a "Bus Selector" block.




Community Treasure Hunt

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

Start Hunting!