0

I'm developing an embedded system in MATLAB Simulink which contains some Stateflow charts. I successfully generate C-code out of it. Unfortunately, building the model throws up some warnings. One of them is:

Warning: Junction #1277 does not have an unconditional path 
to a state or a terminal junction AND it has multiple paths 
leading to it. This might lead to confusing run-time behavior 
because of the backtracking semantics of Stateflow.

This warning has no other link or information how to find that junction inside my model (there are plenty of junctions so it's not trivial) than its number.

Is there a way to find/highlight a junction by its number?

c-a
  • 94
  • 1
  • 12

2 Answers2

0

With the model open, you should be able to do the following:

>> sObj = sfroot;
>> myObj = sObj.find('Id',1277);
>> myObj.view

This will open the object in the sf viewing window.

Phil Goddard
  • 10,571
  • 1
  • 16
  • 28
  • This doesn't work for me. If I open the model and then type your code into the MATLAB command line, the output is: sObj = Simulink.Root myObj = handle: 0-by-1 Error using view (line 63) Invalid input arguments – c-a Mar 09 '17 at 06:51
  • If `myObj` is empty then it means that there is no object with the specified Id. The above code definitely works in R2017a and R2017b. Not sure about earlier versions. – Phil Goddard Oct 18 '17 at 02:15
  • I used 2015b. The IDs also change from run to run, which is kind of weird – c-a Oct 18 '17 at 05:19
0

I found a solution myself: Starting the build process from the "Build" button inside Simulink, rather than doing it via the MATLAB command line, creates working links in the Diagnostic Viewer.

c-a
  • 94
  • 1
  • 12