Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Decrementing counter of encoder reading

As I am a software engineer with limited experience with these things, my wiring skills are always suspect. It could be the case that I've simply wired things up wrong, or that I'm using the scope incorrectly, but I don't think that is the case.  I'll know more when I get my encoder from the same manufacturer in.

0 Kudos
Message 11 of 14
(687 Views)

No offense intended, but if you know your wiring skills are suspect, that seems like a much more likely root cause than a defective encoder of the type you linked.  With bearings rated for billions of cycles, one would expect them to have a strong control process so defects like you describe would be very rare.

 

Now it's also possible that you *caused* damage due to wrong wiring, so you should be doing some more troubleshooting and learning *before* the new encoder arrives else there's a risk of the same thing happening again.

 

The wiring doesn't appear unusual or complicated from the spec sheet -- can you describe more about your wiring, including power sources and shared commons/returns?

 

I can't really interpret the timing specs for the Z-index pulse -- my best guess makes it seem like a wrong implementation.  It doesn't appear to reference the Z duration to the duration of a quadrature state or quadrature cycle.  Normally a Z index will last for either 1 state or 4 states (1 cycle).  I'd be careful to check that out on a scope to determine how it behaves and whether to consider using it.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
Message 12 of 14
(681 Views)

And it turns out that one of my phd advisors recalled that one of the channels was fried, and they switched to another one. And they only concerned themselves with forward motion. OK, that bit of information would have helped a couple of weeks ago, i suppose.  I can certainly reproduce what they had by just counting edges.   Looks like this encoder was a bit wonky from the beginning, so it's likely the case that I didn't make thing worse, but point well taken.

 

And actually, having some wonky hardware around is a good thing for me, as I can now write and test some diagnostics

 

-Evan-

0 Kudos
Message 13 of 14
(675 Views)

Looks like this was a hardware problem.  I tried the angular encoder routines I originally wrote with a new encoder from the same mfr, and things worked just fine.  (A tiny bit different at 5000 pulses per rotation).

 

I can now detect +/- changes in the angle of the wheel, and I see the expected totem-pole signal from the encoder

 

67701637885__DAA93E0C-28EC-4314-A225-6EAD053E9CAF.jpg

 

Thanks for the help -- getting this working as an angular encoder was certainly the way to go.

 

-Evan-

0 Kudos
Message 14 of 14
(656 Views)