Is Integral gain much use with a frequently changing setpoint?
This is how it should look like:

A cascaded loop of outer position control with P-controller, inner velocity loop with PI-controller, yet inner loop of current controller PI.

Only the P-controller is used to be a position controller, not PI.







simulate this circuit &ndash; Schematic created using CircuitLab







simulate this circuit

The above block diagram, is the way I do motion control with PLC. It was tested many times also with hydraulic actuators.
From trajectory planner you get setpoint position and velocity, if the last isn't available then you can derive from setpoint position rate change (v=dp/dt).

v_set = Kp * (p_traj - p_act) + v_traj;
if v_set &gt;= 0.0 then
   positive := true;
else 
   positive := false;
end_if;

if positive then
  if v_set &gt; max_v then  // 100% output
     v_set := max_v;
   elsif v_set &lt; min_v then
     v_set := min_v;     //minimal output for friction load
   ens_if;
else
  ..... negative velocity goes here
end_if;

if traj.done AND (abs(p_set-p_act) &lt; tolerance) then
   stop, toggle the enable of the VFD


With your ABB VFD you can turn it to vector control, you then get a cascaded loops of velocity and current. It's not clear if you can change any of Kp, Ti parameters of the velocity loop,...but as any VFD also this will stall at f&lt;5Hz, so that is the min_v, the low limit in my pseudo program. 

If you will plan to use VFD positionong any further, then use an inverter rated >1.7 x times the motor rated power and use the so called 87Hz technique. Basically you rewire the motor from star to delta and configure the V/f characteristics 87Hz (instead of 50Hz). In such way you get a working speed from 87Hz to 5Hz, which is better than 5..50Hz. 

If this still doesn't sattisfy you needs, then install Option Card MTAC-01 for your VFD. With this you will add a feedback to the VFD, you can still connect your MCU in parallel, so both loops are now closed with feedback : your's position and VFD's velocity.