What is an encoder

I’m trying to grasp my head around it. How can it be used what are the pros and cons of using it? How to program in labview?
Thank you.

Essentially, an encoder is a sensor which detects motion through digital impulses, as opposed to a potentiometer, which reports through an analog channel. The most common sensor to be called an encoder is one which uses two digital inputs and has 4, or some multiple of 4, state changes per rotation of a shaft, referred to as a quadrature encoder.

A simple quadrature encoder has one pin at “zero” when the angle is between 0 and 180, and “one” when between 180 and 360. The other has “one” when the angle is between 90 and 270, “zero” otherwise. The nifty thing about this setup is that (for motion in a constant direction), the order of ups and downs tells you which direction the rotation is going, as the rate of transitions gives you rotational speed.

If you need “absolute” position rather than speed (as you might want for a lift this year), you can either use a potentiometer type sensor, or some sort of limit switch in addition to the encoder that gives you a reference point to count transitions from.

Sorry; we don’t use labview.

Thanks GeeTwo,
We aren’t using servos, but we are using an encoder to try to measure the speed we are going. We wired it to the DIO, and the the designated ports. Would the encoder need to be coded, or should it show up on the driver station screen? Thanks Again :]

The LabVIEW examples include instructions on how to wire and program for quadrature encoders.

You will have to write software to calculate the rpm and other software to write that info to the driver station. In software you have to call either the Encoder VI or Counter VI and these will give you a rate and direction for the encoder VI or a number of pulses or time between pulses for the counter. If all you need is speed than use the Counter VI.