Measure Position and Velocity of Angular Encoder Using One Counter

Updated Jan 12, 2023

Environment

Software

  • LabVIEW Full

Driver

  • NI-DAQmx

  • How can i measure velocity and position if I only have one counter?
  • In the past I have used two tasks to measure velocity and position is there a way to do it with one?
  • Can I take position measurements and convert to velocity in software?

One way to measure velocity and position from one counter is to set up a counter task to take buffered position measurements. If you plot these position measurements against time, you can use the slope as the Revolutions Per Minute (RPM). Use the Unwrap VI in order to accommodate jumps from 360 to 0. Use the snippet below as a start: