Ramping Down the variable in Arduino IDE with the help of millis()??......

Your code cannot work, setpoint is not declared. When you post examples, please make sure that they actually work.

That said; What you are trying to do cannot be done in a method with local variables.