06-15-2016 12:50 PM
I'm taking an angular encoder reading using a PXI 6224 and can do a simple edge count which appears to be working correctly but when I try to do an angular measurement, the measured value barely changes and when it does, whatever it changes to it often remains at if I then reverse the direction.
The encoder is 5000 PPR, I'm not using the Z index because it never makes a full rotation to we can just zero the reading before a test.
I tried the shipping examples as well and get the same results.
Does anyone know what might be an issue?
Solved! Go to Solution.
06-16-2016 03:28 AM
I would hook up a scope (or wire the outputs to the analog input) and have a look and the signals.
How fast is your movement? Maybe some filter settings need to be adjusted.
Type of sensor? How is it connected?
06-16-2016 07:22 AM
Yea, I was going to scope it this morning because late yesterday I was manually turning the shaft and noticed that it seemed to increment a few times (meaning if I had a 5000 PPR encoder, I'd get an angle reading of a few 1/5000ths of a revolution) and then decrement even though I didn't change directions. It would then repeat that as I continued in the same direction so it seems like it might be having trouble determining the direction which would explain why I can count edges fine on A or B but not translate that to angle direction and magnitude. Maybe the phase shift is considerably greater or less then 90 deg.
06-16-2016 09:45 AM
So I scoped it this morning, right at the PXI to see if I was getting any significant noise and the output looks good, same voltage levels on both A and B and a 90 deg phase shift with a nice clean square waveform.
Here's what I'm getting in terms of angle measurement versus simple edge counting. I preform the same manual movement in all three cases over a range of about 60 degrees one direction and then back the other.
The only difference between the angle measurement and the two edge counts is I'm using the DAQmx angle measurement versus the Edge Counting measurement.
06-17-2016 04:41 PM
The problem is noise. I don't know if someone connected the ground wrong (will need to check) or if this is just an inherently noisy setup but enabling the digital filter option on the channel property and setting a minimum pulse width corrects the issue.