Thread Subject: Simulink Buses and Model Referencing

Subject: Simulink Buses and Model Referencing

From: Stefan Leier

Date: 3 Jun, 2008 12:33:03

Message: 1 of 3

Hello everybody,

I'm facing a problem with buses and model references within
my project. Although I read about virtual/non-virtual buses
and blocks as well as about the signal conversion block, I'm
not able to solve the following problem:

I have two model reference blocks which are interconnected
via a non-virtual bus. Block A is my central unit sending
commands to block B which is doing some kind of processing
and after that, it should display the undertaken actions
according to the received commands. After the simulation I
cannot see any signals on a scope block which is within my
model reference block B. Strangely, I can see the results on
a second scope block outside block B by routing the same
signals to an output port.
What do I have to do to be able to see the signals on the
scope block within B?? Is this possible with referenced
model blocks in general or does this only work with, e.g.,
subsystems?? Since the physical model, represented by block
B, does contain an indication panel, I need to display the
processed signals within block B.

Any response or help is very appreciated.

Best regards,
Stefan

Subject: Simulink Buses and Model Referencing

From: Fangjun Jiang

Date: 3 Jun, 2008 14:04:02

Message: 2 of 3

I think this is the expected behaviour. It has nothing to
do with bus.

When you open the model reference block B, it is regarded
as if you are working on the referenced model B alone. You
can run simulation on B alone but of course there is no
input.

If you are using model reference block B in your main
model and you want to look at some of the signals inside
the referenced model B, you have to route those signals to
your main model.

Make a simple example without bus, you'll see what I mean.

"Stefan Leier" <stefan.leier@diehl-aerospace.de> wrote in
message <g23dlv$2dv$1@fred.mathworks.com>...
> Hello everybody,
>
> I'm facing a problem with buses and model references
within
> my project. Although I read about virtual/non-virtual
buses
> and blocks as well as about the signal conversion block,
I'm
> not able to solve the following problem:
>
> I have two model reference blocks which are
interconnected
> via a non-virtual bus. Block A is my central unit sending
> commands to block B which is doing some kind of
processing
> and after that, it should display the undertaken actions
> according to the received commands. After the simulation
I
> cannot see any signals on a scope block which is within
my
> model reference block B. Strangely, I can see the
results on
> a second scope block outside block B by routing the same
> signals to an output port.
> What do I have to do to be able to see the signals on the
> scope block within B?? Is this possible with referenced
> model blocks in general or does this only work with,
e.g.,
> subsystems?? Since the physical model, represented by
block
> B, does contain an indication panel, I need to display
the
> processed signals within block B.
>
> Any response or help is very appreciated.
>
> Best regards,
> Stefan

Subject: Simulink Buses and Model Referencing

From: Seth Popinchalk

Date: 4 Jun, 2008 02:17:01

Message: 3 of 3

Stefan,
This is the expected behavior for accelerated mode model
reference. If you want to see the scopes in your reference
model you have to switch it to Normal model (Available since
R2007b). Right click on the model reference block and
select Model Reference Parameters...

From the dialog, change the mode for that instance of the
reference model to Normal instead of Accelerated.

Normal model allows the reference model to run as an
interpreted model, which is most useful for debugging and
looking at scopes etc.

try:
sldemo_mdlref_bus to see and example of this in action. If
the corners of the reference model block are filled
triangles, it is accelerated. If they are empty triangles,
this is normal mode.

For the full details, check the doc:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/bq_84fh-1.html

"Fangjun Jiang" <f@j.com> wrote in message
<g23j0i$7jm$1@fred.mathworks.com>...
> I think this is the expected behaviour. It has nothing to
> do with bus.
>
> When you open the model reference block B, it is regarded
> as if you are working on the referenced model B alone. You
> can run simulation on B alone but of course there is no
> input.
>
> If you are using model reference block B in your main
> model and you want to look at some of the signals inside
> the referenced model B, you have to route those signals to
> your main model.
>
> Make a simple example without bus, you'll see what I mean.
>
> "Stefan Leier" <stefan.leier@diehl-aerospace.de> wrote in
> message <g23dlv$2dv$1@fred.mathworks.com>...
> > Hello everybody,
> >
> > I'm facing a problem with buses and model references
> within
> > my project. Although I read about virtual/non-virtual
> buses
> > and blocks as well as about the signal conversion block,
> I'm
> > not able to solve the following problem:
> >
> > I have two model reference blocks which are
> interconnected
> > via a non-virtual bus. Block A is my central unit sending
> > commands to block B which is doing some kind of
> processing
> > and after that, it should display the undertaken actions
> > according to the received commands. After the simulation
> I
> > cannot see any signals on a scope block which is within
> my
> > model reference block B. Strangely, I can see the
> results on
> > a second scope block outside block B by routing the same
> > signals to an output port.
> > What do I have to do to be able to see the signals on the
> > scope block within B?? Is this possible with referenced
> > model blocks in general or does this only work with,
> e.g.,
> > subsystems?? Since the physical model, represented by
> block
> > B, does contain an indication panel, I need to display
> the
> > processed signals within block B.
> >
> > Any response or help is very appreciated.
> >
> > Best regards,
> > Stefan
>

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
model reference Seth Popinchalk 3 Jun, 2008 22:20:11
simulink Seth Popinchalk 3 Jun, 2008 22:20:11
model reference... Stefan Leier 3 Jun, 2008 08:35:07
buses Stefan Leier 3 Jun, 2008 08:35:07
simulink Stefan Leier 3 Jun, 2008 08:35:07
rssFeed for this Thread

Contact us at files@mathworks.com