02-01-2024 04:56 AM
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.
02-06-2024 06:32 AM
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
02-06-2024 07:58 AM - edited 02-06-2024 08:07 AM
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...)
02-06-2024 08:30 AM - edited 02-06-2024 08:43 AM
Kevin,
this is what you find if you are digging in the sound and vibration suite ..
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)