Thread Subject: execution order in simulink

Subject: execution order in simulink

From: Nagaraju boya

Date: 29 Feb, 2008 12:17:01

Message: 1 of 8

Hi everyone,


I want to know the execution order on a page in simulink
subsystem. Is it based on port numbers or top to bottom.

I dont have execution order in format menu

Thanks in advance
Naga

Subject: execution order in simulink

From: checker

Date: 29 Feb, 2008 19:51:54

Message: 2 of 8

On Feb 29, 5:17 am, "Nagaraju boya" <naga...@mathworks.com> wrote:
> Hi everyone,
>
> I want to know the execution order on a page in simulink
> subsystem. Is it based on port numbers or top to bottom.
>
> I dont have execution order in format menu
>
> Thanks in advance
> Naga

I confirm that the execution order isn't available as it should be (as
indicated in the documentation, R13 SP1). The setting is available in
R14 SP3. I wasn't able to find any bug report to this effect. Nor
was I able to (quickly) determine a method of getting the execution
order. Perhaps a simulink report my do so.

If it's important to you, consider a bug report to TMW on this issue
to see what they have to say. Also, an upgrade to R14 may be in
order.

-Chris

Subject: execution order in simulink

From: Seth Popinchalk

Date: 7 Mar, 2008 19:04:02

Message: 3 of 8

You have some options for getting the execution order.

1) To just SEE the order, click on the menu Format->Block
Displays->Sorted Order

2) You can also get this using the debugger, click on the
debugger start the simulation and then look at the sorted
list tab

3) Use the command line debugger:
>> sldebug(bdroot)
%----------------------------------------------------------------%
[TM = 0 ] vdp.Simulate
(sldebug @0): >> slist

---- Sorted list for 'vdp' [9 nonvirtual blocks, directFeed=0]
  0:0 'vdp/x1' (Integrator)
  0:1 'vdp/Out1' (Outport)
  0:2 'vdp/x2' (Integrator)
  0:3 'vdp/Out2' (Outport)
  0:4 'vdp/Scope' (Scope)
  0:5 'vdp/Fcn' (Fcn)
  0:6 'vdp/Product' (Product)
  0:7 'vdp/Mu' (Gain)
  0:8 'vdp/Sum' (Sum)

(sldebug @0): >> quit
Debugger simulation aborted

Try that.
-Seth

checker <checkeraz69@yahoo.com> wrote in message
<7afd1fbd-c67a-467e-9704-2321cdc299fa@e25g2000prg.googlegroups.com>...
> On Feb 29, 5:17 am, "Nagaraju boya"
<naga...@mathworks.com> wrote:
> > Hi everyone,
> >
> > I want to know the execution order on a page in simulink
> > subsystem. Is it based on port numbers or top to bottom.
> >
> > I dont have execution order in format menu
> >
> > Thanks in advance
> > Naga
>
> I confirm that the execution order isn't available as it
should be (as
> indicated in the documentation, R13 SP1). The setting is
available in
> R14 SP3. I wasn't able to find any bug report to this
effect. Nor
> was I able to (quickly) determine a method of getting the
execution
> order. Perhaps a simulink report my do so.
>
> If it's important to you, consider a bug report to TMW on
this issue
> to see what they have to say. Also, an upgrade to R14 may
be in
> order.
>
> -Chris

Subject: execution order in simulink

From: Nagaraju boya

Date: 10 Mar, 2008 05:17:03

Message: 4 of 8

"Seth Popinchalk" <Seth.Popinchalk.nospam@mathworks.com>
wrote in message <fqs3j2$hae$1@fred.mathworks.com>...
> You have some options for getting the execution order.
>
> 1) To just SEE the order, click on the menu Format->Block
> Displays->Sorted Order
>
> 2) You can also get this using the debugger, click on the
> debugger start the simulation and then look at the sorted
> list tab
>
> 3) Use the command line debugger:
> >> sldebug(bdroot)
> %--------------------------------------------------------
--------%
> [TM = 0 ] vdp.Simulate
> (sldebug @0): >> slist
>
> ---- Sorted list for 'vdp' [9 nonvirtual blocks,
directFeed=0]
> 0:0 'vdp/x1' (Integrator)
> 0:1 'vdp/Out1' (Outport)
> 0:2 'vdp/x2' (Integrator)
> 0:3 'vdp/Out2' (Outport)
> 0:4 'vdp/Scope' (Scope)
> 0:5 'vdp/Fcn' (Fcn)
> 0:6 'vdp/Product' (Product)
> 0:7 'vdp/Mu' (Gain)
> 0:8 'vdp/Sum' (Sum)
>
> (sldebug @0): >> quit
> Debugger simulation aborted
>
> Try that.
> -Seth
>
> checker <checkeraz69@yahoo.com> wrote in message
> <7afd1fbd-c67a-467e-9704-
2321cdc299fa@e25g2000prg.googlegroups.com>...
> > On Feb 29, 5:17 am, "Nagaraju boya"
> <naga...@mathworks.com> wrote:
> > > Hi everyone,
> > >
> > > I want to know the execution order on a page in
simulink
> > > subsystem. Is it based on port numbers or top to
bottom.
> > >
> > > I dont have execution order in format menu
> > >
> > > Thanks in advance
> > > Naga
> >
> > I confirm that the execution order isn't available as
it
> should be (as
> > indicated in the documentation, R13 SP1). The setting
is
> available in
> > R14 SP3. I wasn't able to find any bug report to this
> effect. Nor
> > was I able to (quickly) determine a method of getting
the
> execution
> > order. Perhaps a simulink report my do so.
> >
> > If it's important to you, consider a bug report to TMW
on
> this issue
> > to see what they have to say. Also, an upgrade to R14
may
> be in
> > order.
> >
> > -Chris
>
Hi seth

thanks a lot for ur reply.

one more question how can model the subsystem if i know
the order ( how to start with)..

Subject: execution order in simulink

From: Seth Popinchalk

Date: 10 Mar, 2008 11:06:12

Message: 5 of 8

"Nagaraju boya" <nagaele@mathworks.com> wrote in message
<fr2g8f$ber$1@fred.mathworks.com>...
> Hi seth
>
> thanks a lot for ur reply.
>
> one more question how can model the subsystem if i know
> the order ( how to start with)..

Simulink determines the execution order of blocks based on
their connections, so if the output of A feeds B and B feeds
C, (and all blocks are direct feed-through) the order will
be A, B, C. Blocks that don't have direct feed-through can
be placed anywhere in the order, as long at their output is
calculated before any blocks that need it.

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f13-91940.html#brbj4u4

If you have two components that don't have a direct data
dependency, you can assign a relative priority for both
blocks and Simulink will try to honor it. The lower
priority will be sorted to execute before the higher priority.

http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/f13-91940.html#f13-91958

Good luck.
Seth

Subject: execution order in simulink

From: Nagaraju boya

Date: 11 Mar, 2008 07:18:04

Message: 6 of 8

"Seth Popinchalk" <Seth.Popinchalk.nospam@mathworks.com>
wrote in message <fr34n4$15c$1@fred.mathworks.com>...
> "Nagaraju boya" <nagaele@mathworks.com> wrote in message
> <fr2g8f$ber$1@fred.mathworks.com>...
> > Hi seth
> >
> > thanks a lot for ur reply.
> >
> > one more question how can model the subsystem if i
know
> > the order ( how to start with)..
>
> Simulink determines the execution order of blocks based
on
> their connections, so if the output of A feeds B and B
feeds
> C, (and all blocks are direct feed-through) the order
will
> be A, B, C. Blocks that don't have direct feed-through
can
> be placed anywhere in the order, as long at their output
is
> calculated before any blocks that need it.
>
>
http://www.mathworks.com/access/helpdesk/help/toolbox/simul
ink/ug/f13-91940.html#brbj4u4
>
> If you have two components that don't have a direct data
> dependency, you can assign a relative priority for both
> blocks and Simulink will try to honor it. The lower
> priority will be sorted to execute before the higher
priority.
>
>
http://www.mathworks.com/access/helpdesk/help/toolbox/simul
ink/ug/f13-91940.html#f13-91958
>
> Good luck.
> Seth
>
>
Hi Seth,

Thanks a lot for ur detailed explanation.

I have one more question if u dont mind

how can i implement union concept when modelling

thanks in advance

regards
nagaraju

Subject: execution order in simulink

From: Seth Popinchalk

Date: 11 Mar, 2008 20:44:02

Message: 7 of 8

"Nagaraju boya" <nagaele@mathworks.com> wrote in message
> how can i implement union concept when modelling

Nagaraju,
I don't understand what you are asking regarding unions.
Are you referring to the C data construct? Do you mean that
you want to take two signals and make them into one?

There is the concept of a merge in Simulink where two
conditionally executed block outputs are written to the same
signal memory.

Provide more details if this doesn't help.

Subject: execution order in simulink

From: Nagaraju boya

Date: 12 Mar, 2008 05:30:20

Message: 8 of 8

"Seth Popinchalk" <Seth.Popinchalk.nospam@mathworks.com>
wrote in message <fr6qui$bmr$1@fred.mathworks.com>...
> "Nagaraju boya" <nagaele@mathworks.com> wrote in message
> > how can i implement union concept when modelling
>
> Nagaraju,
> I don't understand what you are asking regarding unions.
> Are you referring to the C data construct? Do you mean
that
> you want to take two signals and make them into one?
>
> There is the concept of a merge in Simulink where two
> conditionally executed block outputs are written to the
same
> signal memory.
>
> Provide more details if this doesn't help.
>
Thanks a lot for answering my questions

Here are my union definitions and piece of code using
union members. i need to model them in simulink using
fixed point modelling.
union SLUNION
{
    SLong L32;
    SWord W16;
};

static SLUNION ExhTemp; // L32: H=E*0x10000; W16: H=E*1


if (WarmupCorr.W16 !=
0) /
/ unnecessary to keep filtering?
    {
        WarmupFiltCnst = WarmupFiltCnstTbl.Interp(
CatTemp.GetGasflowThruCat() );
        if (WarmupCorr.W16 <
0x100) //gu
ard against overflow
        {
            WarmupCorr.L32 = ((WarmupCorr.L32>>9)
*WarmupFiltCnst) >> 7;
        }
        else
        {
            WarmupCorr.L32 = ((WarmupCorr.L32>>12)
*WarmupFiltCnst) >> 4;
        }
    }
Our requirement is to convert cpp code into simulink models
Thanks in advance.

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
simulink Seth Popinchalk 7 Mar, 2008 14:05:07
simulink Ned Gulley 29 Feb, 2008 17:44:32
rssFeed for this Thread

Contact us at files@mathworks.com