Chapter 3 Tuning Servo Systems
NI-Motion User Manual 3-4 ni.com
PID Loop Descriptions
The following are common variables relating to the PID control loop.

Kp (Proportional Gain)

The proportional gain (Kp) determines the contribution of restoring force
that is directly proportional to the position error. This restoring force
functions in much the same way as a spring in a mechanical system.
Each sample period, the PID loop calculates the position error, which is the
difference between the instantaneous trajectory position and the primary
feedback position, and multiplies the position error by Kp to produce the
proportional component of the 16-bit DAC command output.
An axis with too small a value of Kp is unable to hold the axis in position
and is very soft. Increasing Kp stiffens the axis and improves its disturbance
torque rejection. However, too large a value of Kp often results in
instability.

Ki (Integral Gain)

The integral gain (Ki) determines the contribution of restoring force that
increases with time, ensuring that the static position error in the servo loop
is forced to zero. This restoring force works against constant torque loads
to help achieve zero position error when the axis is stopped.
Each sample period, the position error is added to the accumulation of
previous position errors to form an integration sum. This integration sum is
scaled by dividing by 256 prior to being multiplied by Ki.
In applications with small static torque loads, this value can be left at its
default value of zero (0). For systems having high static torque loads, this
value should be tuned to minimize position error when the axis is stopped.
Although non-zero values of Ki cause reduced static position error, they
tend to cause increased position error during acceleration and deceleration.
This effect can be mitigated through the use of the Integration Limit
parameter. Too high a value of Ki often results in servo loop instability.
National Instruments therefore recommends that you leave Ki at its default
value of zero until the servo system operation is stable. Then you can add a
small amount of Ki to minimize static position errors.