02-20-2019 01:58 PM - edited 02-20-2019 01:59 PM
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.
02-20-2019 02:13 PM - edited 02-20-2019 02:13 PM
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?
02-20-2019 02:17 PM
NI USB-6341, which I don't think offers that unless I am overlooking it.
02-20-2019 02:22 PM - edited 02-20-2019 02:22 PM
Your card can be set up to do the following:
02-20-2019 02:24 PM
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.
02-20-2019 02:28 PM
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?
02-20-2019 02:40 PM
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
02-20-2019 02:47 PM
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.
02-20-2019 02:52 PM - edited 02-20-2019 02:54 PM
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.
02-20-2019 02:57 PM
I am not seeing consistency between the pulses and the index. How are you counting the index?