I can't say for certain that it will do what you want, but at least it will do
something now.
You should add a short wait (5-10 ms) inside the loop with the PID function, so it doesn't monopolize the cRIO's CPU. You can't control the motor any more often than every 5 ms anyway.