Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Getting Encoder Position Value (http://www.chiefdelphi.com/forums/showthread.php?t=98985)

kws4000 21-12-2011 20:37

Getting Encoder Position Value
 
Alright, here's a zinger:

C++[
float elbowencoder = encoder1->Get();
]

This would return a 4x value of it's position, so that I could figure out where it was and what to do with it at that point.

How would I accomplish this in LV?

Thanks.

Me, your local knucklehead.

plnyyanks 21-12-2011 20:44

Re: Getting Encoder Position Value
 
1 Attachment(s)
In LV, when you open the encoder, you have to specify 4x decoding. Then, you can just read the encoder value as a double. See the attached screenshot.

Attachment 11227

kws4000 26-12-2011 15:02

Re: Getting Encoder Position Value
 
So distance is what I'll want if I want to know where I am in relation to startup?

So if I'm reading this right, rate will be used for, say, traction control?

plnyyanks 26-12-2011 21:47

Re: Getting Encoder Position Value
 
Quote:

Originally Posted by kws4000 (Post 1093825)
So distance is what I'll want if I want to know where I am in relation to startup?

So if I'm reading this right, rate will be used for, say, traction control?

That is correct. I forgot to mention, that when you open the encoder, one of the inputs to the Encoder Open VI is "Distance Per Count", which is the tangible distance per encoder tick (and I think it also factors into the rate calculation). Make good use of that parameter, and look into the VI documentation for some more information.


All times are GMT -5. The time now is 09:24.

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