Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

How to deal with counter wrapping on negative (below zero)

$
0
0

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


Viewing all articles
Browse latest Browse all 1271

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>