10-21-2024 02:22 PM
A little background on my testing application. I'm measuring a resolver and converting those measurements into angular position values. I have that part of my code working (not included in the attachment) and I'm currently working on an algorithm to keep a running total of the angular revolutions (in degrees). The algorithm is needed because the resolver is absolute and only gives me 0-360°. So, I have to have a rollover routine that senses when a rollover (0° -> 360° or 360° -> 0°) has occurred and account for it in the running angular revolutions.
Some information on the attached VI. The left for loop is just creating a mock resolver signal and feeding it into the algorithm in the right for loop. The right for loop is working, but I feel like it may be a little Rube Goldberg. Is there an easier, or more elegant, way of accomplishing what I'm currently doing in my algorithm (right for loop)? Any suggestions/insights are welcome.
Solved! Go to Solution.
10-21-2024 04:02 PM
Why not just use the Unwrap Phase VI? (There is also a point-by-point one if needed.)
10-21-2024 05:02 PM - edited 10-21-2024 05:03 PM
Use mcduff's suggestion!
number of revolutions can be calculated:
(output(final) - output(initial))/360.
I would also recommend making number of revolutions a DBL. The current implementation tops out at 32767 revolutions.
10-22-2024 05:47 AM - edited 10-22-2024 05:48 AM
Thanks mcduff for pointing me to the Unwrap Phase VI. I didn't know that existed and it's exactly what I need. No need for me to reinvent the wheel.