Gain Function

Simulation VI and Function

Gain Function

Owning Palette: Signal Arithmetic Functions

Installed With: Control Design and Simulation Module

Multiplies the input you specify by the gain.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs
 Place on the block diagram  Find on the Functions palette

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies information about the input and gain of this function. You can select from the following options:
  • Scalar—(Default) Specifies that this function takes a scalar input and applies a scalar gain.
  • Vector—Specifies that this function takes a vector input and applies a vector gain.
  • Vector,ScalarGain—Specifies that this function takes a vector input and applies a scalar gain.
  • Vector,MatrixGain—Specifies that this function performs the matrix multiplication Y = G U, where Y is the m x 1 output matrix, G is the m x n gain matrix, and U is the n x 1 input vector.
  • Dot product—Specifies that this function calculates the dot product of the input and gain vectors. If you select this option, these vectors must be of equal length.
ParametersLists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box.
Parameter InformationContains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box.
Parameter sourceSpecifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the simulation diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the simulation diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the simulation diagram. You then must set the value for this parameter inside the configuration dialog box.
gainSpecifies the value by which you want to multiply the value of the input.

Block Diagram Inputs

ParameterDescription
gainSpecifies the value by which you want to multiply the value of the input.
inputSpecifies the signal to which you want to apply the gain.

Block Diagram Outputs

ParameterDescription
outputReturns the product of the input signal and the gain.

Gain Details

Use this function in place of the LabVIEW Multiply function to represent gain on the simulation diagram.

Feedthrough Behavior

All input/output pairs of this function have direct feedthrough behavior.