using an encoder without a b source

I was just wondering if anyone had successfully used the WPI encoder VI without a B source. (yes, we’d no longer be able to know direction, but for something like a shooter wheel we’re only driving in one direction, that’s okay). Our hopes that simply leaving the B phase unhooked leading to speed only results from the encoder VIs didn’t pan out.

We’re currently looking into creating an up/down counter inside periodic tasks similar to the up/down example that ships with Labview and just sampling over a given period to calculate RPM.

Just curious if anybody else had faced a similar challenge, and what they came up with. (The reason we only have one phase, is we’re not using a traditional encoder, but something more like an IR tachometer, reflective spot on our shaft/wheel, with an IR LED transmitter, and a phototransistor counting pulses. In the old days, we’d write an interrupt routine to increment a counter every time the pulse was detected, and just read the counter every 40ms cycle, and divide by time elapsed)

Other ideas discussed included: generating a fake B source using some sort of transform on the A source, or mounting a second phototransistor 90 degrees off the first to get a true b source.

Open to any thoughts or suggestions,
Thanks!
-David

The counter was exactly what was intended to be used for this use case.

Cool, we’ll give it a try. We had some initial issues when we tried hooking it up this way, especially with varying values (returned anywhere from 7000 to 9000 rpm). We checked the signal generated by the sensor, and it was steady as a rock. We didn’t have it in periodic tasks though, just inside our teleop section, we’ll move it out, and tweak the values. Just wanted to make sure we were headed in the right direction.