Ioannis,

I think you need to limit the pid_Out values to only positive numbers, and discard the negative values instead of converting them to positive ones.

The way you have it ... the more it tries to reduce the voltage, the higher the output goes.

After it gosubs to the PID routine ... Try this ...
Code:
    IF pid_Out.15 THEN pid_Out = 0   ' limit to positive values
    HPWM 1, pid_Out, 500             'Set PWM output