Sum block not summing inputs

I'm having trouble with a Sum block in my Simulink model. When I use the debugger to watch its input/output values, I see that it appears to be just passing U1 through, rather than adding the 3 values. Can anyone tell me why this might happen?
Trace: Data of 0:180 Sum block 'Robot_4_Motors/dc_motor_simplified/Sum':
U1 = [-0.064934694127110726]
U2 = [0]
U3 = [0.62636893981851649]
Y1 = [-0.064934694127110726]

4 件のコメント

Ryan
Ryan 2012 年 7 月 3 日
Did you change any settings under the 'Main' or 'Signal Attributes' sum block parameters?
Guy Rouleau
Guy Rouleau 2012 年 7 月 3 日
I would really like to see that model. Can you place it on some file sharing site so I can give a look?
At first look, this is surprising.
A few things I would try and/or like to know:
- Try is disabling optimization options like block reduction, signal reuse, etc. - Do you have hand-written s-functions in the model? If yes, try removing them from the model, and/or enable the "array out of bound exceeded" diagnostic. - Try enabling Test Points on all the input and output of the block. - Does that happen to other blocks in the model? - Is this happening for all time steps? or only once? - Always only the first input port is passed? - Are there any conditionally executed subsystem before or after? - Is there a Merge block involved?
Without the model, it is difficult to be 100% sure... so I would really like to see the model to see if there is an explanation.
Nick Jordan
Nick Jordan 2012 年 8 月 1 日
Sorry to have asked this and then disappeared. I had selected to be notified by email when an answer was added, but apparently that doesn't work for comments. Can I be notified of comments somehow?
I monitored several sum blocks on this model, and all of the blocks with a subtraction seemed to be failing, and were all just passing U1 directly through to Y1. The one in my original post is '-+-', for example. I turned off signal storage reuse, and now it seems to be working correctly. I don't understand why this option was messing it up though.
Here is a link to the model file: https://dl.dropbox.com/u/15325551/Robot_4_Motors.mdl And to the corresponding initialization file: https://dl.dropbox.com/u/15325551/MMP30_Init.m
Walter Roberson
Walter Roberson 2012 年 8 月 1 日
Sorry, there is no notification for comments in the current MATLAB Answers system.

サインインしてコメントする。

 採用された回答

Nick Jordan
Nick Jordan 2012 年 8 月 14 日

1 投票

Disabling Signal Reuse, as Guy Rouleau suggested, solved this problem and made the Sum block start working correctly.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGeneral Applications についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by