07-23-2009 03:07 PM
I am working on this VI to control a motor. I will receive feedback from the motor on its position.
I will manually turn the motor, which will produce current/voltage. When the current (I found the relationship between the current and voltage being input into the motor) is lower than a threshold level, I want the VI to use the PID controller and turn the motor back to its original position (and resist the force I'm manually applying to the motor) which I've inputted. When the current is greater than the threshold value, I want the actual position of the motor to equal the desired position of the motor, so the program will allow me to turn the motor.
I seem to have that part figured out. However, after I have manually turned the motor, I will release it. When I release the motor, the current is now below the threshold value and the motor will start to turn back to the original inputted position. Is there a way to keep the motor from turning back to the original position? I want it to stay still after I stop turning it manually.
I have included my VIs, hopefully, it will make things clearer.
Thanks for the help.
07-24-2009 02:52 PM
07-24-2009 03:15 PM
Thank you Randall. I am a bit stuck on how to update my Input 1 though, since it is an inputted value that the user picks at the beginning. How would I be able to substitute this inputted value for the updated, current position.
07-24-2009 11:33 PM