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

DAQmx Angular Encoder Velocity

$
0
0

I am using the "CI Angular Velocity" DAQmx task with an NI9361. It works for the most part. However, I am running into a problem where the velocity value hangs at the last valid measurement. In practical terms, this means if the encoder comes to a sharp stop, then the velocity continues to read whatever value it was at before the encoder stopped.

 

This is always an issue when taking frequency type measurements. Normally specifying the "CI.MaxMeasPeriod" property on the task takes care of the issue; if the time since the last pulse received exceeds the maximum measurement period, the frequency measurement value is artificially set to a value of 0. I would expect the same behavior out of encoder velocity. However this same method is just not working.

 

For now, I am using some dirty logic to set the value to zero after the task read if the encoder position value hasn't changed in a second or so. I would like a cleaner solution. I could just use a frequency task and scale into deg/s but I also don't like that method. If anyone has any tips they could share with me that would be greatly appreciated. 

 

Thanks,

Corey

EncVel_MaxMeasPeriod.JPG


Viewing all articles
Browse latest Browse all 1271

Trending Articles



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