LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missed counts....

Hi, I'm reading in counts off an encoder. The VI's I used are fine and I can spin the encoder at the fastest speed(2khz) and get the proper reading. My problem is when I compare the counts to trigger a AI read within the case.
I use a CASE statement. I set it to trigger at count 40...then 100...ect. If the motor spins slow enough it works fine. But go to a fast speed(2khz) and the CASE statement will miss that specific count. If I put a range on the case...say 39-41 then it works fine....but this might introduce other errors in my AI readings. I'm a beginner and can't come up with a better way to do this. Any ideas as to a better way?

TIA!
Cirrus
0 Kudos
Message 1 of 2
(2,656 Views)
The problem is that the hardware is going too fast for the software. Anything that produces an output pulse frequency faster than say 1kHz will be difficult to interface with software. I assume your using the serial port? Labview and anything else won't manage to keep up with the encoder. You will have to re-think your hardware and have an external counter/divider to produce a pulse after 40, 100.... counts and feed that into the pc.
Message 2 of 2
(2,656 Views)