View Single Post
  #5   Spotlight this post!  
Unread 20-03-2016, 17:09
btcshields6 btcshields6 is offline
Registered User
FRC #4206
 
Join Date: Aug 2014
Location: Texas
Posts: 107
btcshields6 is an unknown quantity at this point
Re: Setting Mechanism Position with Button

It's an arm moving from an angle of about 15 degrees to about 75 degrees. I suspect a timed termination would be mostly sufficient, unless there was a mechanical conflict that prevented the actuation happening in the normal amount of time. However, I'd prefer it to terminate when it has confirmation that it's achieved the specified position, or something very near that, like with a deadband on a joystick control.

I know I could just leave the loops running constantly, and switch between them to get to different positions. The PID would 0 out, and presumably no movement would occur. But I just figured it'd be better to terminate after. The arm is worm gear, so it will not backdrive (so far it hasn't), so I just don't see a reason to keep it running.

Do I face any issues leaving it running? If not, I could have each loop in a separate case of a single case structure within periodic tasks, and switch between the cases to go to various positions, avoiding termination entirely.
Reply With Quote