.

Sum

Overview

Overview

The Sum block computes the sum of several Inputs (2-6), each multiplied by a gain value. A diagram of the Sum (2 Input) block is shown below:

The configuration values for this block are as follows:

 
K1, K2, K3...

Input gains. There may be up to six gains (K1..K6) corresponding to the number of inputs.

Ts

Sample period for the algorithm. This is the cycle time of the algorithm in Simulink simulation. This value has no effect on the execution of the block on the controller.

Subsample Code A code which determines the schedule for updating this block (every sample, even samples only, etc.) See Subsampling.

Matlab/Simulink

Simulink Interface

The inputs are double precision values that are multiplied by their respective gains and summed to form the output.

The block has two user data fields (User Data 0, User Data 1) to store application-specific data for convenient storage and retrieval. See User Data Storage for details.

The block's update schedule is determined by the Subsample Code (See Subsampling). The following Parameter Dialog Box can be opened by double-clicking on the block in a Simulink Model (3 Input version shown):  

sum_sim2

 

C++ API

SUMBlock

Declaration

Public Method

 
SUMBlock&   SUM();
  Required Header: mechaware.h

Description

The Sum block computes the sum of several Inputs (2-6), each multiplied by a gain value.

 
double SUM().nSum

Number of inputs (and gains).

double SUM().Coeff[ ]

Gain Array.

Methods

Block Methods

See Also

Divide
Modulo Operator
Multiply
Power (Exponentiation)
Sign
Sine

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2012 Motion Engineering