11-13-2013 10:04 AM
I am using the DaqMX Angular position VI's to read quadrature encoders. I find thatthe encoders do not wrap "correctly" when going through zero, even when I use the Double rather than U32 data type option. In other words, the counter counts down like this 3, 2, 1, 0, +4billion & change.
How have people dealt with this? Should I set the starting count to + 2billion&change and then subtract that off of all my readings? I suppose it can be made to work, but is ugly.
Is there a better way?
Thanks.
Mark Holm
11-13-2013 12:20 PM
If you convert the U32 reading to an I32 you should get the correct negative number:
If you use the double read (rather than U32) and you configure your channel to measure in "radians" or "degrees" (rather than "ticks") then I believe DAQmx will return negative values for position as well.
Best Regards,