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.

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.







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.