LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulating Optical encoder in LabVIEW

I need to reproduce the behavior of an Optical Encoder. The idea would be able to determine the speed and the direction in which the user is turning a knob or a dial in a graphical interface. It is possible to join the two end of a knob 0 and 10 by selecting the Position/Size/Select tool and moving the value 10 of the indicator toward the 0. I don't know if there is something that already exist.

Best regards,

Nitrof
0 Kudos
Message 1 of 4
(3,376 Views)
Well, you can take a KNOB control, use the positioning tool to move the value 10 to overlap the 0, and get a full 360 degree control - I commonly use this with min/max of 0/360 for an angle control.

I'm not sure how that "simulates an optical encoder", though - it won't generate pulses to count. It's still a numeric value that you read.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(3,376 Views)
Nitrof wrote:
> I need to reproduce the behavior of an Optical Encoder. The idea
> would be able to determine the speed and the direction in which the
> user is turning a knob or a dial in a graphical interface. It is
> possible to join the two end of a knob 0 and 10 by selecting the
> Position/Size/Select tool and moving the value 10 of the indicator
> toward the 0. I don't know if there is something that already exist.
>
> Best regards,
>
> Nitrof

I don't think there is a control that does this. To work just like an
optical encoder it would be nice to be able to cast the control to an
enumeration (enumerations wrap around on increment). It would also be
nice to incorporate the counting into the control, like a multiple turn
potentiometer that never
runs out. Next, you could make something using
the picture control and the mouse position; I might try this just for
fun. Also, there are other ActiveX controls used in Visual Basic, etc
that you can import.
0 Kudos
Message 3 of 4
(3,376 Views)
Nitrof,
my suggestion
UI: use a slider with a centered zero for your speed. a 360° dial indicator or something nifty with picture control as a position indicator, and a diagram for your pulses.
Program: a loop with shiftregister for position. read speed , calc new position, generate pulsetrain
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 4
(3,376 Views)