08-06-2009 07:48 AM
Hi, I'm trying to measure velocity from a quad encoder. I have LV 8.0 and a pci-6250. So far the attempts at this seem to run into problems because of a inconsistent sample time. Has someone acuurately measured velocity of an quad encoder using a DAQ counter? Please let me know.
Thanks
Mike
08-06-2009 08:56 AM
Hello,
Have you tried using the DAQ assistant to set up one counter to perform a frequency measurement of Pin A of the encoder?
If knowing direction is important, then you could set up 1 counter to perform Edge Count on encoder Pin A with external Count Direction connected to PinB, and a second counter to perform frequency measurement of Pin A.
I hope this helps.
08-06-2009 09:58 AM
08-06-2009 12:06 PM
What is the PPR of your encoder and how fast are you currently trying to read the pulses?
08-06-2009 12:11 PM
I've varied the loop delay quite a bit but right now it's at 100ms (1KHz)
Is that the sample rate of the counter?
The pulse per rev of the encoder is 500
08-06-2009 12:14 PM
08-06-2009 12:26 PM
08-06-2009 12:40 PM
08-06-2009 01:09 PM
What is your code currently doing? Have you checked out some of the NI examples? Check in the DAQ>Counter Measurements section of the Example Finder. You might prefer to count pulses or instead use the DAQ VIs to measure frequency, etc. You are probably getting an unstable speed measurement because you are not counting/measuring the pulses fast enough. Missing pulses will do that.
08-10-2009 08:08 AM
I had been using the examples all along to get this going. I've taken a jpeg snapshot of the test code I have running. I'm trying to use the tick count and the timed loop structure to build the velocity profile. I'm varying the period of the timed loop but mainly leaving at 100ms and that will produce a waveform close to the goal (attached).
The peak value is close as well as the end tiem but I cannot get them to match. Any suggestions will help. Thanks,