Go to Post Having someone with as much mainstream appeal as will.i.am is a great strategy to draw large amounts of attention to a program that has been relatively hidden to the masses. - Karthik [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 05-02-2011, 08:41
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Encoder as PIDSource

So I added this in my constructor:

elevatorEncoder->SetPIDSourceParameter(Encoder::kDistance);

Is that correct? We want to test our robot today and see how it performs and I can't afford to introduce code problems outside of my experience level and lose a day of tweaking on our new hardware. (Today is hopefully first test day of our finalish robot)

I am not going to update the robot's image until I know this will work. We have a working set of code with the previous posts and I'll be using an un-updated computer to tweak our code while testing our robot today.

I am somewhat worried because when I was calling Encoder->, the SetPIDSourceParameter did not show up under the little menu of methods I could select. Also none of the colors changed when I entered the above line. Do I have to do a fresh build or something for the built in Windriver "IntelliSense" to catch up?
Reply With Quote
  #17   Spotlight this post!  
Unread 07-02-2011, 05:24
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoder as PIDSource

Quote:
Originally Posted by sircedric4 View Post
So I added this in my constructor:

elevatorEncoder->SetPIDSourceParameter(Encoder::kDistance);

Is that correct? We want to test our robot today and see how it performs and I can't afford to introduce code problems outside of my experience level and lose a day of tweaking on our new hardware. (Today is hopefully first test day of our finalish robot)

I am not going to update the robot's image until I know this will work. We have a working set of code with the previous posts and I'll be using an un-updated computer to tweak our code while testing our robot today.

I am somewhat worried because when I was calling Encoder->, the SetPIDSourceParameter did not show up under the little menu of methods I could select. Also none of the colors changed when I entered the above line. Do I have to do a fresh build or something for the built in Windriver "IntelliSense" to catch up?
Looks OK to me. I'm not sure exactly what it takes to update the intellisense. Perhaps you have to refresh the project or reopen workbench or something.

-Joe
Reply With Quote
  #18   Spotlight this post!  
Unread 07-02-2011, 20:13
sircedric4's Avatar
sircedric4 sircedric4 is offline
Registered User
AKA: Darren
no team (The SS Prometheus)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Lousiana
Posts: 245
sircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond reputesircedric4 has a reputation beyond repute
Re: Encoder as PIDSource

All right, just to post our results, we got the new update on our robot, and the new Encoder class works a champ now. The code I posted earlier does work as posted if anyone else is looking for examples.

The "Intellisense" will update if you close and re-open Windriver. Good day today.
Reply With Quote
  #19   Spotlight this post!  
Unread 08-02-2011, 10:21
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Encoder as PIDSource

It is nice that the Encoder class can be used as a PIDSource now but it ends up that it still doesn't help me. I am using one encoder for both position AND speed feedback. Not a problem tho i just create two classes, RatePIDSource and PositionPIDSource. I pass a reference to a single Encoder into the constructor of these two objects and in their PIDGet() return distance or rate accordingly.
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 13:39.

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