PID control of dual acting cylinder

Map the raw analog value from 0,1024 into the desired range, e.g. -255,255 or whatever applies to your cylinder. The same for the setpoint.

You may need SetOutputLimits() to the full output ränge, i.e. -255,255. See the PID tutorial page for configuration.