Go to Post A lot of students decribe FIRST as the best thing that happened to their life. Once a student gets hooked, they don't want to leave FIRST for any cause. I am one of them. - Arefin Bari [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 29-04-2013, 23:47
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
PID Through Digital Breakout

For the past 2 years, our team has used PID through the CAN jaguar set PID functions. However, in light of multiple failures in the CAN jaguar system on our robot this year, including 2 jags suddenly failing to communicate with the bus in the Curie semifinals, we have decided to look into using talons as our primary motor controllers going forward. I would appreciate if anyone could post functional LabVIEW code to run PID for a shooter or similar application through the digital breakout, as my past attempts to do so have not been fruitful.

Thanks in advance,
David Donahue
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
  #2   Spotlight this post!  
Unread 30-04-2013, 09:12
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID Through Digital Breakout


A few questions:

1) Can you provide more detail about what you mean by "not fruitful"?

2) Did you use the PID vi provided in the FRC LabVIEW installation, or did you try to brew your own?

3) Are you bound and determined to use PID for shooter wheel speed control? Many teams have been quite successful using simpler control algorithms such as bang-bang.

4) Have you tried searching the forums and reading some of the many threads on this topic?


  #3   Spotlight this post!  
Unread 30-04-2013, 09:36
chris.boyle's Avatar
chris.boyle chris.boyle is offline
Programming Mentor
FRC #0068 (Truck Town Thunder)
Team Role: Mentor
 
Join Date: Nov 2011
Rookie Year: 2012
Location: Truck Town Thunder (Brandon)
Posts: 36
chris.boyle is on a distinguished road
Re: PID Through Digital Breakout

We have used a PID function for the last couple of years in LabVIEW with very good success. Our entire source code project is available for download at http://www.trucktownthunder.com/resources.html. There is both 2012 and 2013 Dashboard and Robot Code available for download.

Within the 2013 code look at the ShooterControlLoop.vi in the Shooter Library\ShooterLibrary.lvlib. Most variables for tuning the PID loop are set in the T3-Prefs.ini which is read in Begin.vi.
__________________
2014 Chairman's Award--Michigan State Championship
2014 Chairman's Award--Waterford District
2014 Winner--Great Lakes Bay District
2013 Chairman's Award--Kettering District
2012 Championship Division Finalists--Thanks 330 and 639
  #4   Spotlight this post!  
Unread 30-04-2013, 11:54
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,906
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: PID Through Digital Breakout

Keep in mind that particular code implementations and their effectiveness are greatly dependent on the particular sensor characteristics and sensor methods employed.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #5   Spotlight this post!  
Unread 30-04-2013, 12:00
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,425
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: PID Through Digital Breakout

Quote:
Originally Posted by Mark McLeod View Post
Keep in mind that particular code implementations and their effectiveness are greatly dependent on the particular sensor characteristics and sensor methods employed.
As well as the physical system it is controlling.
__________________

Be Healthy. Never Stop Learning. Say It Like It Is. Own It. Like our values? Flexware Innovation is hiring!. We're looking for Senior Automation, Software, and System Engineers. Check us out!
  #6   Spotlight this post!  
Unread 30-04-2013, 12:03
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,906
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: PID Through Digital Breakout

Quote:
Originally Posted by efoote868 View Post
As well as the physical system it is controlling.
I just popped back in here to add that, as it started to nag at the back of my mind.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #7   Spotlight this post!  
Unread 30-04-2013, 14:25
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
Re: PID Through Digital Breakout

Quote:
Originally Posted by Ether View Post

A few questions:

1) Can you provide more detail about what you mean by "not fruitful"?

2) Did you use the PID vi provided in the FRC LabVIEW installation, or did you try to brew your own?

3) Are you bound and determined to use PID for shooter wheel speed control? Many teams have been quite successful using simpler control algorithms such as bang-bang.

4) Have you tried searching the forums and reading some of the many threads on this topic?


1)I have yet to successfully regulate any robot functions using the built in LabVIEW PID tools

2) I used the PID.vi in the default toolkit

3) PID is the only method that I have interacted with, but I am open to other methods.

4) Yes, I have. Quite extensively, actually. Otherwise I wouldn't have started a thread. I needed an example of implementation of PID in robot code through the DIO; It is not the theory behind it that is posing an issue. I am capable of using Google, but a search engine is only germane if the query is capable of finding the resource needed. If appropriate resources cannot be found in existing resources, then posing a thread in an attempt to better understand an issue is pertinent. As such, given the lack of specific examples that I found on the forums, I decided it would be best to attempt to find the answers by means of a new thread.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
  #8   Spotlight this post!  
Unread 30-04-2013, 14:27
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
Re: PID Through Digital Breakout

Quote:
Originally Posted by chris.boyle View Post
We have used a PID function for the last couple of years in LabVIEW with very good success. Our entire source code project is available for download at http://www.trucktownthunder.com/resources.html. There is both 2012 and 2013 Dashboard and Robot Code available for download.

Within the 2013 code look at the ShooterControlLoop.vi in the Shooter Library\ShooterLibrary.lvlib. Most variables for tuning the PID loop are set in the T3-Prefs.ini which is read in Begin.vi.
Thank you.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
  #9   Spotlight this post!  
Unread 30-04-2013, 16:45
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: PID Through Digital Breakout

I remember our software team made a "teach-able" ARM and WRIST on our 2011 robot. You would jog the robot to a position, then rotate a KEY that was the "teach mode". Then you pressed the button you wanted to assign those values too. And the crio wrote to a txt file the pre-sets.

Then the pre-sets where loaded into the Labview PID. It wasn't very accurate, but it worked good enough to place tubes on a pipe.

Here is the 2011 robot code:
http://www.frcsoft.com/forums/index....ads&showcat=31
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #10   Spotlight this post!  
Unread 01-05-2013, 15:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: PID Through Digital Breakout


@David(blackflame2996): Did you get all your questions answered? Are your LabVIEW efforts fruitful now?

As efoote868 and Mark mentioned in previous posts, the controller is only half of the equation. The plant is the other half. If you find yourself still struggling, a give-and-take dialog here with more detail will allow us to help you (if you want).


  #11   Spotlight this post!  
Unread 01-05-2013, 16:14
404'd's Avatar
404'd 404'd is offline
Lead contributor of sweg
AKA: Josh
FRC #0967 (Iron Lions (9-sits-7))
Team Role: Alumni
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Marion, Iowa
Posts: 86
404'd is a name known to all404'd is a name known to all404'd is a name known to all404'd is a name known to all404'd is a name known to all404'd is a name known to all
Re: PID Through Digital Breakout

Quote:
Originally Posted by blackflame2996 View Post
For the past 2 years, our team has used PID through the CAN jaguar set PID functions. However, in light of multiple failures in the CAN jaguar system on our robot this year, including 2 jags suddenly failing to communicate with the bus in the Curie semifinals, we have decided to look into using talons as our primary motor controllers going forward. I would appreciate if anyone could post functional LabVIEW code to run PID for a shooter or similar application through the digital breakout, as my past attempts to do so have not been fruitful.

Thanks in advance,
David Donahue
We've had pretty good success with code similar to this code for the past 2 years with shooters. We were able to get fast spin up times with minor oscillation around the set point with little tuning at all. In 2012 we used a KOP encoder, this year we used a lower count US digital encoder both with good success.

LabVIEW (like other programming languages I would assume) you need to setup how many counts to average over, etc. to get the best results. I can't remember off the top of my head how many counts we average over for the 64 count encoder.

As Ether said the Bang-Bang controller is also a really good option. I tinkered with it a little and it seemed pretty simple to implement.
__________________
Driving "Career":
2012 GKC: Quarterfinals w/ 6th seeded alliance | Wisconsin: Quarterfinals - 3rd seeded alliance captains
2013 GKC: Quarterfinals w/ 5th seeded alliance | North Star: Regional winners, 2nd seeded alliance captains
2013 CMP: Curie Semis w/ 2056 + 3990
  #12   Spotlight this post!  
Unread 01-05-2013, 18:45
blackflame2996's Avatar
blackflame2996 blackflame2996 is offline
Alumni
AKA: David Donahue
FRC #2996 (Cougars Gone Wired)
Team Role: Alumni
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Colorado springs, CO
Posts: 67
blackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to allblackflame2996 is a name known to all
Re: PID Through Digital Breakout

The team 68 code did the trick. I was misunderstanding the value that the PID.vi returned, tested it today and it works. Thanks all.
__________________
2009 Regional Winners
2011 Regional Chairman's Award
2012 Regional Winners
2013 Regional Chairman's Award
  #13   Spotlight this post!  
Unread 01-05-2013, 19:01
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,019
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: PID Through Digital Breakout

I just love happy endings.
__________________

I am N2IRZ - What's your callsign?
Closed Thread


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 03:32.

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