LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sample clock pulses were detected within one period of the input signal error

I have the following VI, and getting the Multiple Sample Clock pulses were detected within one period of the input signal error when I run the VI. The CountEdges channel, PFI0, is channel A of an encoder. The clock source, PFI6, is an index signal coming from the motor that the encoder is using. The goal of the VI is to measure the number of rising edges from the encoder during an entire revolution. I'm not sure how the daq would be reading multiple index pulses during a single input period, so I'm thinking I have something wrong with the VI. Any help would be appreciated.

0 Kudos
Message 1 of 19
(3,764 Views)

What are you using for data acquisition. You may already have a encoder counter available so you would not have to write code to do this?

Tim
GHSP
0 Kudos
Message 2 of 19
(3,756 Views)

NI USB-6341, which I don't think offers that unless I am overlooking it.

0 Kudos
Message 3 of 19
(3,747 Views)

Your card can be set up to do the following:

 

Counter measurements
Edge counting, pulse, pulse width,
semi-period, period, two-edge separation
Position measurements
X1, X2, X4 quadrature encoding with
Channel Z reloading; two-pulse encoding
 
you need to go into the property nodes and you can make the card do all of the counting.
 
Here is a link to the manual.
 
page 10.
Tim
GHSP
0 Kudos
Message 4 of 19
(3,743 Views)

Everything I've seen with the quadrature encoding is for measuring the current position. I haven't seen anyway to get the counts between Z pulses though.

0 Kudos
Message 5 of 19
(3,737 Views)

How does your encoder work. In most cases you need to wire the signal to the digital counter. It will count the pulses and convert them. If you leave the distance as one it should give you pluses and not distance. If you have the encoder you could have an A and B pulse and a Z pulse. What encoder are you using?

Tim
GHSP
0 Kudos
Message 6 of 19
(3,735 Views)

Right now I am testing this with just a simple 2 channel 4 ppr encoder. The index signal from the motor would be acting the same as a Z though except for not being exactly on an A edge like a normal Z would be. I just made a quick VI using daq assistant and keeping the distance as 1, and the output was always 0

0 Kudos
Message 7 of 19
(3,730 Views)

Have you tried measuring the voltage to see if you actually see a change in pulse? You might also have to pull the pulse down to see a change. Maybe the motor is PNP and you have to draw it to 0VDC to get it to read. It depends on how the pulses work.

Tim
GHSP
0 Kudos
Message 8 of 19
(3,725 Views)

These are the signal for CH A and the index. The signals look just as they should. The strange thing is I ran the VI I created again, and now it doesn't give an error. The count is right about 80% of the time though, and the other 20% it will be between 0 and 3.                                                                  

 

scope.png

0 Kudos
Message 9 of 19
(3,720 Views)

I am not seeing consistency between the pulses and the index. How are you counting the index?

Tim
GHSP
0 Kudos
Message 10 of 19
(3,712 Views)