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 Comments

Did you change any settings under the 'Main' or 'Signal Attributes' sum block parameters?
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.
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
Sorry, there is no notification for comments in the current MATLAB Answers system.

Sign in to comment.

 Accepted Answer

Nick Jordan
Nick Jordan on 14 Aug 2012
Disabling Signal Reuse, as Guy Rouleau suggested, solved this problem and made the Sum block start working correctly.

More Answers (0)

Categories

Find more on General Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!