4

I substituted my originial question, the problem is still the same, but the conditions are now different. To review the original question, have a look at the revisions.

I'm looking for a way to interactively select the signals I want to get displayed in my scope Block. The Bus Selector Block with the property Output as Bus does exactly that. I can select all desired signals conveniently without changing any block or signal dimensions.

enter image description here enter image description here

But the scope block can obviously not handle properly signal names of buses. Therefore my scope legends are wrong:

enter image description here

If I don't set the Output as Bus property and Mux the signal together into the scope block it displays the right signal names. But this is no option as I'd need to adjust the Mux-dimension according to the signals selected.

Are there any workarounds?

(A Floating Scope is no option either)

Community
  • 1
  • 1
Robert Seifert
  • 25,078
  • 11
  • 68
  • 113
  • How does the output of the subsystem look? The legend is similar to plotting an array with 4 elements. Make sure there is no implicit bus to vector conversion. Did you set the out port from the subsystem to match the bus data type? – remus Dec 06 '13 at 13:49
  • Check this: double-click on out port, switch to Signal Attributes, set Data type to your bus definition. The icon of the out port should also change. – remus Dec 06 '13 at 13:51
  • @remus: all my signals are simple doubles. Therefore I set the output also to double (see screenshot). No change. I also tried to set the `Port dimensions` to `4`, no change. – Robert Seifert Dec 06 '13 at 14:11
  • 1
    But the data type should be changed to bus (not double) in order to propagate as bus signals. Otherwise Simulink implicitly converts your bus to a vector and signal names are lost outside the subsystem. – remus Dec 06 '13 at 14:12
  • @remus: I actually tried this as well, resulting in the error shown above. I create a little minimal example and upload it, so you could set it up properly, would that be possible? – Robert Seifert Dec 06 '13 at 14:18
  • You're right. It doesn't work. I just made a MnWE. I'll keep digging. – remus Dec 06 '13 at 14:22
  • @remus I added a link to a minimal example I prepared. Thanks for your help already! – Robert Seifert Dec 06 '13 at 14:25
  • It looks like Simulink doesn't know how to propagate bus signal names from subsytems. I made a dummy workaround: a series of bus selector and bus creator. https://www.dropbox.com/s/cwgql0dd0nigp93/minimalexampleBuses2.slx – remus Dec 06 '13 at 14:49
  • @remus it's the same I implemented by myself in the meanwhile. Ugly, but necessary. Thank you anyway! Argh, well actually I did all this to get the possibility of variable bus dimensions dependent on my masked subsystem, I will get in trouble again with that solution. I'm going to fiddle around some more time, – Robert Seifert Dec 06 '13 at 14:51
  • File a feature request to mathworks. Such a feature should exist in Simulink. – remus Dec 06 '13 at 14:52
  • @remus: I completely modified the question. But it probably won't increase the probabilty for a solution, will it? – Robert Seifert Dec 06 '13 at 16:25
  • @am304: you always have a solution for simulink questions and you're a bus expert :) Any ideas? – Robert Seifert Dec 06 '13 at 16:27
  • @thewaywewalk Sorry, I'm stumped... You can always file a bug report with MathWorks but that won't solve your immediate problem. I could imagine a subsystem with some callbacks that would change the wiring and number of inputs to the Mux block based on user input, but just thinking about it, it's going to be very ugly to implement. – am304 Dec 07 '13 at 19:15
  • When you **consider name on each signal** (_by twice clicks on signals line_) and then can see _those names_ on the scope! ;) – S At Aug 14 '17 at 13:12

0 Answers0