Hi,
Correct.
1) We accumulate (in the pid_Ei variable) the error over Ti number of samples
2) We multiply the accumulated error by the integral gain
3) We divide the result by Ti to get the average error over Ti number of samples.
4) We add the result to the PID_I variable and make sure it doesn't violate or min/max settings.
5) We clear the accumulator (the pid_Ei variable).

So, PID_I is the actual integral term, it holds the history of all past errors and is what's used to "build" the final output together with the P and D terms (and the feedforward terms). The accumulation/averaging kind of low pass filters the integral term. If you you don't want to use it then simply use a Ti of 1 - it'll then update the I-term every cycle with the error at exactly that sample.

There are different ways of implementing a PID filter and this is only one of them. Another change I'm thinking of implementing is the option to have the differential term work from the feedback instead of the setpoint.

/Henrik.