I made a PID simulator to teach some of our programmers. It simulates an arm with or without gravity pulling it down.
Check out my post about it here:
http://www.chiefdelphi.com/forums/sh...d.php?t=130801
For a sample of a well tuned loop, try setting a setpoint of 200, a mass of 0.03, kP of .35, and kD to 5, then click start.
The simulation is fairly realistic, and takes into account motor torque curves and the inertia of the arm.