Page 1 of 1

Infinite sampling-time blocks can't chain together

Posted: Fri Feb 25, 2011 6:42 pm
by bmairs
When using infinite sampling times on initialization blocks (remembering to enable inline parameters), these blocks cannot be chained together with the block ordering input/outputs. If you do this, it only calls the final block reducing earlier blocks to zeroes.

A workaround for this is to manually order the blocks using their Priority property under "Block Properties".

Is it possible to fix this issue so that the block ordering inputs/outputs could work in this situation?

Re: Infinite sampling-time blocks can't chain together

Posted: Thu Mar 10, 2011 12:56 am
by bmairs
Lubin, have you gotten a chance to check this problem out? It's made setting up various initialization calls a lot more tedious than it should be.

Re: Infinite sampling-time blocks can't chain together

Posted: Sun Mar 13, 2011 12:28 pm
by LubinKerhuel
Hi Bryant,

I didn't took into account your first post.
Anyway, I'll look at this now.
Would you have a model example to share as it's always faster to start from an example illustrating the problem.

I'll do my own if it's complicated for you

Lubin

Re: Infinite sampling-time blocks can't chain together

Posted: Mon Mar 14, 2011 2:23 pm
by LubinKerhuel
Does your init functions requires input parameters and output results, or is it only a initialisation function without any input/output parameters ?
If so, there might be a possibility for me to adapt the C function Call block...

Re: Infinite sampling-time blocks can't chain together

Posted: Tue Mar 15, 2011 8:12 am
by LubinKerhuel
Blockset update : C function Call dialog box new parameters.
You can now define
- One function for block update (The function that was used by default in the older C function call block)
- One function for block Init (Call each time block is reseted, at initialisation time and each time the subsystem containing the block is reseted)
- One function for block Start (call only once for initialisation and reset purpose)

The initialisation should be placed within the Start function that is always call once, even with the "inline parameters option" activated.
However, theses two added function cannot readdirectly values from block's inport or output value to block's outport.

Lubin