Go to Post More teams will want to join, peers who are not on the team will understand the program better, television will become interested in FIRST again, sponsors will be easier to get, cancer will be cured, the Israelis and Palestineians will live in harmony, and we will have world peace. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 01-18-2015, 07:14 PM
BradAMiller BradAMiller is online now
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 587
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: How to program Encoders with PID Subsystem

Quote:
Originally Posted by admrialkunkka View Post
We need help programming our encoders with a PID subsystem because of lack of documentation. We intend to use the encoders for our drive train PID subsystem.
If you create an example java project in eclipse and choose GearsBot you can see some samples of PIDSubsystem classes. Look in the subsystem package (folder) and look at Elevator and Wrist. In both cases it shows how to write the PID subsystem uses a potentiometer as the sensor.

Then to control the height of the elevator or the angle of the wrist, look at the commands SetElevatorSetpoint and SetWristSetpoint. The idea is that the PIDController is embedded in the PID Subsystem and the setting of the set point is in the command. The command finishes when the mechanism actual value is at the stepping +/- the tolerance (set in the subsystem).

There is also a video that describes how to write that program from scratch that's here: http://wp.wpi.edu/wpilib/2012/02/15/...-videos-posted.

Hope that helps.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
 


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 08:14 AM.

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