|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Sequencing Question
So i had programmed an arm via a PID loop for our autonomous code. Naturally, I put this in a sequenceing loop so that the arm would raise BEFORE the robot went barreling into the plexiglass wall. I was told the wrong times that the arm would complete it's cycle, and naturally it was too short. The arm in autonomous naturally during the match kept going during the match and blew the arm out (those at nycfrc got to see the nice show. Match 8 i believe).
My hypothesis on what happened is that the PID ended after the time sequence and the motors retained their values (in our case, full throttle). I am almost certain this is right, but i just want to check with you guys. Thank you in advance. |
|
#2
|
|||||
|
|||||
|
Re: Sequencing Question
The last thing you should always do in autonomous is zero out all your motors...
The FPGA always remembers and keeps doing the last thing you told it to do. You can also zero everything in a First Time Only case in Teleop to be on the safe side. |
|
#3
|
||||
|
||||
|
Re: Sequencing Question
Yeah, I figured that the the arm would have hit the required position and the PID would have corrected and done this all for me at the time BEFORE the time terminated. In the last step, all the motors are set back to zero but at that point it was too late, what a shame
. |
|
#4
|
|||||
|
|||||
|
Re: Sequencing Question
Yea, in the case of potential unfinished auto actions (PID loop not completing, encoder value not reached, etc.), adding a block in Teleop to initialize everything will safeguard against runaway motors and PID integral windup.
Two simple ways to set that up are:
Last edited by Mark McLeod : 14-03-2011 at 11:08. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|