PID Library MISHAP!(Pls Help longTime problem)

If Output is negative you have to turn the motor in the other direction.

for that I have to define the encoder0pos as Double then the software provides the negative or positive values from this variable