Go to Post Until we learn to celebrate our differences with great vigor in an earnest way, we won't accomplish what we're supposed to get done. - Rich Kressly [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Spotlight this post!  
Unread 09-01-2013, 21:38
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: [FTC]: LABVIEW: Help with programming an Arm with an Encoder

Quote:
Originally Posted by Robobuff1.0 View Post
Okay here is a picture of my code. So is it correct? I want the motor to go to the encoder position and hold.
Since you have reset the encoder, it will start out at zero, and you are giving a positive power, so the encoder value will go up.

Which means that test: Encoder > -360 will be true immediately, so the loop will exit immediately. So perhaps it should be > 360.

Some suggestions....

You really should have a "wait" in that loop because once it starts working, it will lock up the program for the duration of the arm move (which may not be a good idea) You should maybe wait for 25 to 50 msec.

Also., once the loop exits, if you don't send a new motor command in 2.5 seconds, it will droop down again.

FTC used to have a "move to position" (rather than "Move fixed distance")which would do exactly what you want here, with a single call, but I couldn't find it this year (had to roll my own).

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
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 12:49.

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