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.
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
My recollection of the standard FTC encoders is that they provide 1/4 degree resolution, which gives 1440 pulses per revolution.
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.
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.
Are you using Robot-C?
Check the predefined variable nMotorEncoder]
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).
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:
Especially Webinar #4
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)
Using a protoboard you could add a potentiometer to an axle to base your position.