Go to Post I live for the offseason...that is, when i'm not living for the actual season. - Libby K [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
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 07-01-2013, 22:05
Robobuff1.0's Avatar
Robobuff1.0 Robobuff1.0 is offline
Registered User
FRC #1633
 
Join Date: Jan 2011
Location: Arizona
Posts: 46
Robobuff1.0 is an unknown quantity at this point
[FTC]: Encoder programming in labview for teleop

Hi so my team is using encoders this year and I'm not familiar in programming them. Our plan was to incorporate encoders in our teleop code. Like for example when I press button 1 I want the arm to go to a specific position using the encoder. I've been researching and doing trial and error for about a month now and can't quite get it any help will be much appreciated Thank you in advance.
__________________
FRC: 1633
FTC: 2873
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2013, 00:59
nathan_hui nathan_hui is offline
Registered User
AKA: Nathan Hui
FRC #2473 (CHS Robotics)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Cupertino, CA
Posts: 228
nathan_hui will become famous soon enoughnathan_hui will become famous soon enough
Send a message via AIM to nathan_hui
Re: [FTC]: Encoder programming in labview for teleop

So an encoder is simply a sensor that tells you how much the encoder has rotated. For moving an arm to a specific position, you need to use a control algorithm such as PID. PID works by calculating a power setting for the motor based on the arm's current position (taken from the encoder) relative to the position you want the arm at. If you're in FTC, I believe you'll be using either NXT-G or RobotC (are there others?), however, I'm only familiar with RobotC.
__________________
Nathan Hui
B.S. Electrical Engineering, UCSD '16
FRC 2473 (CHS Robotics), Team Captain '12
FTC 4950, 6038
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2013, 08:36
Robobuff1.0's Avatar
Robobuff1.0 Robobuff1.0 is offline
Registered User
FRC #1633
 
Join Date: Jan 2011
Location: Arizona
Posts: 46
Robobuff1.0 is an unknown quantity at this point
Re: [FTC]: Encoder programming in labview for teleop

We are using lab view and I'm familiar with what an encoder is but what's confusing me is how to set up the PID structure
__________________
FRC: 1633
FTC: 2873
Reply With Quote
  #4   Spotlight this post!  
Unread 08-01-2013, 09:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: [FTC]: Encoder programming in labview for teleop

Quote:
Originally Posted by Robobuff1.0 View Post
We are using lab view and I'm familiar with what an encoder is but what's confusing me is how to set up the PID structure
Could you be a bit more specific? It's not clear what you mean by "set up the PID structure".

For example, here's a link to the LabVIEW help section for PID. If you could identify what part of it is confusing, it would help get you targeted answers.


Reply With Quote
  #5   Spotlight this post!  
Unread 08-01-2013, 12:15
Robobuff1.0's Avatar
Robobuff1.0 Robobuff1.0 is offline
Registered User
FRC #1633
 
Join Date: Jan 2011
Location: Arizona
Posts: 46
Robobuff1.0 is an unknown quantity at this point
Re: [FTC]: Encoder programming in labview for teleop

I would like to execute a code once when I click a button on the controller. Like when I click button 1 on the controller I want the arm to move to the specified enconder position and stay there until I press another button to retract it. I just need an example to work with.
__________________
FRC: 1633
FTC: 2873
Reply With Quote
  #6   Spotlight this post!  
Unread 08-01-2013, 12:37
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: [FTC]: Encoder programming in labview for teleop

Quote:
Originally Posted by Robobuff1.0 View Post
I would like to execute a code once when I click a button on the controller. Like when I click button 1 on the controller I want the arm to move to the specified enconder position and stay there until I press another button to retract it. I just need an example to work with.
When you press the first button, your code should set the PID setpoint to whatever position you want the arm to go to.

When you press the other button, your code should set the setpoint to whatever position corresponds to "retract".

Does your version of LabVIEW have examples? That would be a great place to look.

Here's another good resource:

http://team358.org/files/programming...2009-/LabVIEW/



Reply With Quote
  #7   Spotlight this post!  
Unread 08-01-2013, 12:54
Robobuff1.0's Avatar
Robobuff1.0 Robobuff1.0 is offline
Registered User
FRC #1633
 
Join Date: Jan 2011
Location: Arizona
Posts: 46
Robobuff1.0 is an unknown quantity at this point
Re: [FTC]: Encoder programming in labview for teleop

The link you gave me is labview for FRC, is it similar to labview ftc
__________________
FRC: 1633
FTC: 2873
Reply With Quote
  #8   Spotlight this post!  
Unread 08-01-2013, 12:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,101
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: [FTC]: Encoder programming in labview for teleop

Quote:
Originally Posted by Robobuff1.0 View Post
The link you gave me is labview for FRC, is it similar to labview ftc
Check to see if your LabVIEW installation has built-in examples how to use PID. If it does, that's usually a very good place to look for help.


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 12:47.

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