Problems using PID to control DC Motor?

I'm trying to follow your tip (about using pots to set the P, I, D values), but I'm stuck on how to update those values to the PID. I've done the following:

int pot = 2;
float potValue = 0;

PID myPid(&Input, &Output, &Setpoint, potValue, 0, 0, DIRECT); 
[/code

And then, in the loop:
[code]
potValue = analogRead(pot);

But of course the potValue in the myPid won't update with the new values when I use the pot (it's probably going to be 0 always, since that's how a initialized potValue.
Any tips?