Go to Post Past success does not guarantee future results.... - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-03-2011, 08:44
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
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.
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11
Reply With Quote
  #2   Spotlight this post!  
Unread 14-03-2011, 09:32
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 14-03-2011, 10:49
Egg 3141592654's Avatar
Egg 3141592654 Egg 3141592654 is offline
Now a mentor, always a student
FRC #0810 (Mechanical Bulls)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Long Island
Posts: 53
Egg 3141592654 is on a distinguished road
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 .
__________________
"The answers to the book of life are not found in the back." Charlie Brown

Software Mentor - Team Apex Robotics 5803

Lead Programmer - Team 810 Mechanical Bulls '09-'11
Reply With Quote
  #4   Spotlight this post!  
Unread 14-03-2011, 11:05
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,833
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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:
  1. Programming->Synchronization->First Call?
  2. The Call Context global in the default Teleop Framework has an Init state.
Either of these can feed a Case statement that duplicates what you have in the last frame of your sequence in Autonomous to stop/halt/pause/wait.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 14-03-2011 at 11:08.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi