LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linear position measurement using angular encoder

I want to use an angle encoder P3022-V1-Cw360 Angular Sensor to measure linear position. The output signal has sawtooth form as in figure below (with 0-5V output signal for 1 revolution). So how can i convert the sawtooth waveform into an continuous position waveform? My idea is to use a counter to count number of revolutions of the encoder when the signal sudden change from 5 to 0V or 0 to 5V but i'm not sure how to do it on labview.  

0 Kudos
Message 1 of 4
(930 Views)

use the unwrap vi?

the pt by pt allow to choose the wrap-base

 

but better check boundary conditions, i made the encoder output +-2.5 (in software) and set the wrap base to 2.5

 

 

 

 

unwrap.pngunwrapD.png

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 ǝɥʇ'


Message 2 of 4
(845 Views)

Good one Henrik,

 

I had only looked at the help for the regular unwrap function, which doesn't provide the same flexibility for defining a unique wrap-base.  Seems like it ought to.  I'm going over to the Idea Exchange to either write this up or add Kudos to whoever already suggested it.

 

 

-Kevin P

 

EDIT:  P.S.  Just back from the Idea Exchange, didn't find a prior mention, but decided this was too trivial an idea compared to the many others waiting for attention and implementation.  It's pretty trivial to implement by just auto-indexing a For Loop that calls the Unwrap Pt-by-Pt function.  (But still bear in mind Henrik's warning about edge conditions, that I haven't tried to carefully check...)

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
Message 3 of 4
(836 Views)

Kevin,

this is what you find if you are digging in the sound and vibration suite ..

SVC unwrap.png

 

I don't know since which version , but in very old LV version the unwrap vi  came with BD  and code (similar IIRR) instead of a crypted call. (which migth be faster.. OK)

 

I need my own unwrapper anyway, since since noise demands a (simple) model based unwrapper ...

 

 

To the toppic:  Care must be taken at the 5-0 or 0-5 jump. If the senor (or a integrating ADC) send intermediate values (so the next value isn't 2,5V away) the jump migth be overseen. One strategy could be a comparision with an unwrapped signal that has a 5-10 point median filter as an edge sharpener??  (depends on SR and ramp speed)

 

 

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 ǝɥʇ'


Message 4 of 4
(827 Views)