Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: [FTC]: Motor Encoder Help (http://www.chiefdelphi.com/forums/showthread.php?t=98316)

Alzir 17-11-2011 16:21

[FTC]: [FTC]: Motor Encoder Help
 
We are using a scissor lift and will need the motor angle. Is there a possible way to get the angle out of the encoder? If it helps any the model of encoder is E4P-360-250-D-D-D-B.

robokiller 17-11-2011 17:17

Re: [FTC]: [FTC]: Motor Encoder Help
 
I think that is going to be a lot of trial and error to find the angle.

But i think a full rotation on an encoder is 1024.
so if that is right 1024/360 = 2.844444444444444 ticks per degree

also if you are going to be turning it a lot try using a large variable like a double

-- Jaxon Weis

PhilBot 17-11-2011 22:26

Re: [FTC]: [FTC]: Motor Encoder Help
 
My recollection of the standard FTC encoders is that they provide 1/4 degree resolution, which gives 1440 pulses per revolution.

Phil.

Slendyman 18-11-2011 12:49

Re: [FTC]: [FTC]: Motor Encoder Help
 
How would one program an encoder using labview? Any little thing would be a great help, cheers.
Edit: We want to be able to measure the angle of the motors.

Alzir 18-11-2011 13:02

Re: [FTC]: [FTC]: Motor Encoder Help
 
Thank you for the information. How exactly do we use it once it is attached? We want a motor to move and after a certain number of ticks it slows down. When it goes the other way having it reset back to how it was originally. I am not sure that is possible since this is the first time my team has worked with encoders so nobody really knows how to do this.

kz2zx 18-11-2011 17:26

Re: [FTC]: [FTC]: Motor Encoder Help
 
Alzir,

Are you using Robot-C?

Check the predefined variable nMotorEncoder[]

Shadowfl 22-11-2011 15:45

Re: [FTC]: [FTC]: Motor Encoder Help
 
I wish we would program in Robot-C but Alzir, Slendyman and i are all working in labview

PhilBot 23-11-2011 08:58

Re: [FTC]: [FTC]: Motor Encoder Help
 
Quote:

Originally Posted by Shadowfl (Post 1086235)
I wish we would program in Robot-C but Alzir, Slendyman and i are all working in labview

You can use the encoders several ways.

You can command the motor to move a certain distance at a given speed (the easiest way), or you can give the motor speed/power commands and watch the encoder value yourself to tell when it has gone the correct distance.

You will need to build a basic program template using the "Generate Code" option on LVLM (choose the "FTC Arm and Gripper" example), and then modify the code to do your specific task.

To see the VIs that are available, open the "TETRIX" pallette on the program Block Diagram. Turn on the Context Help (CTRL H) and roll over each of the available icons.

To run a set distance, use the "Fixed Distance" VI to specifcy encoder counts (1440 per revolution).

Or

Use the "Move Motors" command to start the motor, and then loop calling "DC Motor Status" to read the current encoder value.

For more information on general FTC programming, view the Webinars here:

http://www.tetrixrobotics.com/FTC/

Especially Webinar #4

Phil.

gotrobot? 24-11-2011 17:44

Re: [FTC]: [FTC]: Motor Encoder Help
 
Here are a couple other alternative:

Add a touch sensor to stop the lift and slow the motors down based on time (assuming your batteries are full for each match)

-or-

Using a protoboard you could add a potentiometer to an axle to base your position.


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

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