Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Sometimes my counter starts to count with 65535 instead of zero..

I am counting TTL signals produced by the encoder. I use two counters of PC-TIO-10 for A and B phases of the encoder so that I can see the direction of the rotation. Sometimes one of the counter starts to count with 65535 instead of zero. Sometimes one or two of the counters cannot start to count. What the problem can be? A phase is the source of the 1st counter and the gate of the 2nd one. B is the reverse of this and I control both counters by the same vi.
0 Kudos
Message 1 of 2
(3,183 Views)
Hello;

It's hard to figure out what is wrong with your code without seeing it.
However, you can try some tests to see if the problem is in the code or in the counter.

Configure bothe counters as simple event counter, and wire both encoder phases only to each counter source, and verify if the counter always starts at zero, and if the count values are making sense. I suggest you to grab a example code to execute the test (either from Labview or NI-DAQ shipping examples).

If everything goes as expected, I suggest you to use the example code as your start point for the development.

Hope this helps.
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,183 Views)