Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: Encoder programming in labview for teleop (http://www.chiefdelphi.com/forums/showthread.php?t=110704)

Robobuff1.0 07-01-2013 22:05

[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.

nathan_hui 08-01-2013 00:59

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.

Robobuff1.0 08-01-2013 08:36

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

Ether 08-01-2013 09:06

Re: [FTC]: Encoder programming in labview for teleop
 
Quote:

Originally Posted by Robobuff1.0 (Post 1210567)
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.



Robobuff1.0 08-01-2013 12:15

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.

Ether 08-01-2013 12:37

Re: [FTC]: Encoder programming in labview for teleop
 
Quote:

Originally Posted by Robobuff1.0 (Post 1210698)
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/




Robobuff1.0 08-01-2013 12:54

Re: [FTC]: Encoder programming in labview for teleop
 
The link you gave me is labview for FRC, is it similar to labview ftc

Ether 08-01-2013 12:58

Re: [FTC]: Encoder programming in labview for teleop
 
Quote:

Originally Posted by Robobuff1.0 (Post 1210716)
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.




All times are GMT -5. The time now is 18:22.

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