Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Encoders and Motors (http://www.chiefdelphi.com/forums/showthread.php?t=112570)

jibicax 02-02-2013 08:52

Encoders and Motors
 
1 Attachment(s)
My team wants a robot that you press a button and a "ramp" moves so many degrees up or down. So, like a limit switch but without the absolute endpoints. I know an encoder can do that, but I never worked an Encoder before. I went through the LabVIEW examples till I created the vi below (all the proper open boxes are there). Which starts the motor, but it doesn't stop. Basically, I'm asking how to make an encoder control a motors set output.

PHP Code:

[ATTACH]13753[/ATTACH


bvisness 02-02-2013 15:55

Re: Encoders and Motors
 
Your problem is probably that the encoder does not measure in degrees. An encoder measures ticks per second, which is more suitable for measuring speed and distance than measuring angles.

I think your main problem, though, is that you're getting your current angle by dividing your Distance reading by 360 and taking the remainder. The Distance output will probably read something like inches or feet, depending on how you configured the encoder in Begin.vi. I would just experiment with different positions and find a more appropriate setpoint and process variable.

Or, if you really want to work with angles, you could try mounting a gyro sideways on your ramp. I don't think that's your best option, though.

Mark McLeod 02-02-2013 16:55

Re: Encoders and Motors
 
I'd look at using a potentiometer for this kind of task.

Ether 02-02-2013 17:46

Re: Encoders and Motors
 
Quote:

Originally Posted by bvisness (Post 1226513)
Your problem is probably that the encoder does not measure in degrees... An encoder measures ticks per second, which is more suitable for measuring speed and distance than measuring angles..

What an encoder "measures" depends on how its output signal is decoded. It can measure either angular position or angular speed. These can be converted into distance or linear speed.

http://en.wikipedia.org/wiki/Rotary_encoder

A gyro is a poor choice for measuring the angle of an adjustable ram.



bvisness 02-02-2013 17:51

Re: Encoders and Motors
 
Quote:

Originally Posted by Ether (Post 1226576)
What an encoder "measures" depends on how its output signal is decoded. It can measure either angular position or angular speed. These can be converted into distance or linear speed.

http://en.wikipedia.org/wiki/Rotary_encoder

A gyro is a poor choice for measuring the angle of an adjustable ram.



Ah, you're right. Thanks for correcting me. If you could get an encoder properly configured (which is something that I always have trouble with) that would almost certainly be your best option.

Ether 02-02-2013 17:55

Re: Encoders and Motors
 
Quote:

Originally Posted by bvisness (Post 1226579)
If you could get an encoder properly configured (which is something that I always have trouble with) that would almost certainly be your best option.

I think a potentiometer would be a good, perhaps even better, option for this application (low speed, limited rotation), as Mark suggested.




All times are GMT -5. The time now is 12:07.

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