0 THEN _rDeltaIntegral := (rKp * _rT / rTn) * _rError; ELSE _rDeltaIntegral := 0; END_IF // Only add new integral part if we are going away from the upper or lower bound IF (xSaturatedUpper AND (_rDeltaIntegral > 0.0)) THEN _rDeltaIntegral := 0.0; END_IF IF (xSaturatedLower AND (_rDeltaIntegral < 0.0)) THEN _rDeltaIntegral := 0.0; END_IF // Calculate integral part _rIntegral := _rIntegral + _rDeltaIntegral; // Reset integral with deactivated integral time IF (rTn = 0.0) AND (_rIntegral <> 0) THEN _rIntegral := 0.0; END_IF]]>