Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

PID Function Block

LabVIEW 2009 Real-Time Module Help

Edition Date: June 2009

Part Number: 370622G-01

»View Product Info

Owning Palette: Control Function Block

Requires: RT Module

PID algorithm for PID applications or high speed control applications that require an efficient algorithm. The PID algorithm features control output range limiting with integrator anti-windup and bumpless controller output for PID gain changes. This function block also features manual mode control with bumpless manual to automatic transitions, non-linear integral action, two degree of freedom control, and error-squared control.

You can use this function block to operate on one input value at a time.

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
InputsContains the following configuration options:
  • Terminal name—Contains the name of the block diagram terminal to configure.
  • Visible?—Specifies whether to display the terminal on the block diagram.
  • Variable scope—Specifies the availability and scope of the variable associated with the terminal. Select Single-process to use a single-process shared variable. Select Network-published to use a network-published shared variable. Select No Variable if you do not want to use a terminal variable. To minimize overhead, include function block terminal variables only when necessary. If you change the Variable scope to No Variable after creating the function block instance, LabVIEW deletes the terminal variable.
  • Data source—Specifies the data source of the input. Select Terminal to wire the input value to the terminal on the block diagram. Select Variable to supply the input value to the function block through the associated terminal variable, if available. Select Default value to use the Default value. The Variable data source option is not available if you select No Variable under Variable Scope. If you select Terminal as the data source and leave the block diagram terminal unwired, LabVIEW uses the Default value.
  • Default value—Specifies the default value of the input. If you select Variable as the data source, LabVIEW uses this value as the initial value of the variable. If you select Default value as the data source, LabVIEW uses this value for every iteration of the function block.
OutputsContains the following configuration options:
  • Terminal name—Contains the name of the block diagram terminal to configure.
  • Visible?—Specifies whether to display the terminal on the block diagram.
  • Variable scope—Specifies the availability and scope of the variable associated with the terminal. Select Single-process to use a single-process shared variable. Select Network-published to use a network-published shared variable. Select No Variable if you do not want to use a terminal variable. To minimize overhead, include function block terminal variables only when necessary. If you change the Variable scope to No Variable after creating the function block instance, LabVIEW deletes the terminal variable.

Block Diagram Inputs

ParameterDescription
error in (no error)Describes error conditions that occur before this node runs.
setpointSpecifies the setpoint value of the process variable that you are controlling. This is the desired value for the process variable.
process variableSpecifies the current value of the variable that you are controlling.
Proportional GainSpecifies the proportional gain (Kc) of the PID algorithm. The default value is 1.
integral timeSpecifies the PID parameter (Ti) that adjusts the effect of the error integral term on the output.
derivative timeSpecifies the PID parameter (Td) that adjusts the effect of the error derivative term on the output.
auto? (T)TRUE selects automatic control (default), FALSE selects manual mode. The function block uses bumpless transfer to transition from manual mode to automatic control.
setpoint highSpecifies the maximum value of the setpoint range.
setpoint lowSpecifies the minimum value of the setpoint range.
dt (s)Specifies the interval (in seconds) at which this function block is called. This value is used in PID calculations. If you specify a value less than or equal to zero, this function block calculates the value since last called using an internal timer with 1 millisecond resolution.
output highSpecifies the maximum value of output. This value is represented by a fixed-point number with the same fixed-point type as process variable.
reinitialize (F)Specifies whether to reinitialize internal parameters, such as integrated error. Setting this input to TRUE sets internal parameters to default values of 0.0.
output lowSpecifies the minimum value of output.
betaSpecifies the relative emphasis of disturbance rejection to setpoint tracking. The default value of 1 is appropriate for most applications. A smaller value between 0 and 1 can be used to specify emphasis on disturbance rejection (such as process load changes).
linearitySpecifies the linearity of the error response. The valid range of linearity values is 0 through 1.0. A linearity value of 1.0 generates a normal linear response, while a value of 0.1 generates an approximately parabolic (square law) response.
manual controlSpecifies the value of output while in manual mode.

Block Diagram Outputs

ParameterDescription
error outContains error information. This output provides standard error out functionality.
outputReturns the control output of the PID algorithm that is applied to the controlled process.
dt out (s)Returns the actual time interval in seconds. Indicates either the value specified for dt (s) or the computed interval if dt (s) was specified as -1.0.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit