LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting edges with dynapar encoder

Hello,

 

I am very new to Labview. To kick off some experience, I am trying to count edges on a Dynapar encoder, Model E14020000303. Here is the data sheet:

 https://ecatalog.dynapar.com/downloads/E14_DS_702489_2_.pdf

 

I am using LabVIEW 2011, with a NI USB-6210 DAQ. My white wire on the encoder is connected to PFI0. The red and black wires are connected to my 5V voltage source. I am rotating my encoder to count the revolutions. Supposedly my encoder is a 200 PPR, and it is also quadrature. 

 

However, I am not understanding what I am getting when counting edges using DAQ Assistant. I am using the Edge Count on ctr0. I can set the DAQ assistant to run on 1 sample acquisition mode and count the rising edge. When I turn the encoder 100 times, the measured value on the DAQ Assistant is usually around 76500, which would mean 765 edges counted per revolution. I can also change things around and go to continuous acquisition mode. I set up PFI2 as the external clock source with a rising edge and put the green wire in PFI2. I set it to read 1 sample at 1k Hz. This usually results in counting around 820 edges.

 

I don't understand why I am getting these readings. The DAQ Assistant should only be counting rising edges because that is what it is set at. Why am I getting numbers so high? 

 

Thanks!

 

 

0 Kudos
Message 1 of 7
(4,073 Views)
Does the number vary? You could have a noise problem.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(4,054 Views)

Did you connect the ground of your 5V power source to the digital ground connection on your 6210?

 

-AK2DM

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 3 of 7
(4,046 Views)

Yes, the number does vary. Would 800 edges counted be correct for a quadrature 200 ppr encoder when it is supposed to be counting rising edges?

0 Kudos
Message 4 of 7
(4,010 Views)

No, I did not connect the digital ground connection. I can try that tomorrow. I am learning LabVIEW for work, and I have already left for today.

0 Kudos
Message 5 of 7
(4,008 Views)
The ground could easily cause this sort of behavior.

Mike....

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(3,941 Views)

Hey guys,

 

Sorry for the late reply, I have been put on other tasks. You all were right about the ground, that indeed was the problem. With the daq grounded, the encoder measures 200 edges per revolution.

 

Thanks!

0 Kudos
Message 7 of 7
(3,802 Views)