Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Encoder Pulses Look ok, but Degrees not Correct

Solved!
Go to solution

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?



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 1 of 5
(3,574 Views)

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?

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(3,551 Views)

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.



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 3 of 5
(3,545 Views)

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.

 

encoder.PNG



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
0 Kudos
Message 4 of 5
(3,540 Views)
Solution
Accepted by topic author blackburnite

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.



I saw my father do some work on a car once as a kid and I asked him "How did you know how to do that?" He responded "I didn't, I had to figure it out."
Message 5 of 5
(3,511 Views)