Log in

View Full Version : Rotation sensors


NinjaWithBurnin
27-02-2010, 12:55
Hey

Does anyone know how to get rotation sensors to work in LabView?
we are trying to get the to work for autonomous mode

So foar I have found that they are under encoders in Labview, but still do not know how to get them to work :(

Thanks everyone

whytheheckme
27-02-2010, 13:03
Which rotation sensors are you using? I've been looking for a good set for a long time!

Jacob

NinjaWithBurnin
27-02-2010, 13:09
Just the ones that came with the KOP

most likely the ones off andy mark

Mark McLeod
27-02-2010, 13:18
It's a bit complex, but LabVIEW has an example (Encoder Example) that spells out all that you need to setup. It assumes a digital quad encoder, so a different type, such as a single or an analog one that came in the KOP with the magnets, would be handled differently.

From the Getting Started window select "More..." at the bottom right under Examples.
Then select "Encoder Example"
Open up the Block diagram and you can copy/paste the code over to your project.

It breaks down like this:

Begin.vi
DIO Opens for two channels (assuming a quad encoder like the KOP US Digital ones)
Convert to Digital Source
Encoder Open
Encoder Config Timer
Encoder Start
Encoder RefnumAutonomous Independent.vi
Encoder refnum
Encoder GetFinish.vi
Close encoderCheckout http://www.usdigital.com/first for the encoder assembly guide.

whytheheckme
27-02-2010, 14:20
Ah, the wheel encoders. I thought you had meant just a simple rotation sensor.

Jacob

NinjaWithBurnin
27-02-2010, 16:26
Thank you, I figured out how to start them :)

can you post some diagrams of how I could use the encoders control the motors in the autonomous mode?

Thanks