Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Encoder Trouble (http://www.chiefdelphi.com/forums/showthread.php?t=125599)

Michael U 01-02-2014 22:12

Re: Encoder Trouble
 
I'm afraid we have gone from our meeting today so I will have to postpone tests to tomorrow. Also, (sorry for being ignorant) what does "in quadrature" mean?

cgmv123 01-02-2014 22:59

Re: Encoder Trouble
 
Quote:

Originally Posted by Michael U (Post 1336106)
Also, (sorry for being ignorant) what does "in quadrature" mean?

Quadrature means the A-Channel signal overlaps the B-Channel signal by exactly half. The encoder can't tell which way it's rotating without it. If the A-Channel is first, the motor is rotating one way. If the B-Channel is first, the motor is rotating the other way. If you can test both channels on your scope, the graphs should like like the ones below, depending on the way the motor is rotating.


Ether 01-02-2014 23:03

Re: Encoder Trouble
 
Quote:

Originally Posted by cgmv123 (Post 1336138)
The encoder can't tell which way it's rotating without it. If the A-Channel is first, the motor is rotating one way. If the B-Channel is first, the motor is rotating the other way. If you can test both channels on your scope, the graphs should like like the ones below.


Good description :)


Quote:

Quadrature means the A-Channel signal overlaps the B-Channel signal by exactly half.
Exactly 90 degrees (one quarter).



cgmv123 01-02-2014 23:08

Re: Encoder Trouble
 
Quote:

Originally Posted by Ether (Post 1336140)
Exactly 90 degrees (one quarter).

If you're talking about how it rotates, yes, but if you look at at the graph of the output, it's split in half.

Ether 01-02-2014 23:21

Re: Encoder Trouble
 
Quote:

Originally Posted by cgmv123 (Post 1336147)
If you're talking about how it rotates, yes, but if you look at at the graph of the output, it's split in half.

No, I'm talking about the 90 degree phase shift between the A and B signals.

If it were half (180 degrees), it would look like this:

Code:

    |-----|    |-----|    |-----|
    |    |    |    |    |    |
_____|    |_____|    |_____|    |_____

-----|    |-----|    |-----|    |-----
    |    |    |    |    |    |   
    |_____|    |_____|    |_____|


Michael U 02-02-2014 13:44

Encoder Trouble
 
We can confirm that it is giving the signal at a 90 degree shift.

Ether 02-02-2014 14:12

Re: Encoder Trouble
 
Quote:

Originally Posted by Michael U (Post 1336328)
We can confirm that it is giving the signal at a 90 degree shift.

Well it sure sounds like you are getting a valid signal from the encoders.

Can you post a couple of pictures showing how the encoder wires are connected to the DSC and how the DSC is being powered?



Mark McLeod 02-02-2014 14:46

Re: Encoder Trouble
 
The code is just the LabVIEW encoder example, so I'm assuming that you changed the Target IP address to match your team and used the Run button to execute it?

Assuming that you are using the default front panel values the encoder expects a minimum rate of 20 ticks, so to test the electronics you need to lower that to 1, then you can test the DIO inputs by shorting the signal to ground a few times to see if it registers on your executing front panel.

Connected to DIO 1 and 2, you said.

As implied, you need to make sure that the three Digital Sidecar power LEDs (5v/6v/12v) are all three glowing a merry bright green.
You can test that the DIO's are receiving power using a multimeter between power and ground.

Michael U 02-02-2014 20:00

Encoder Trouble
 
1 Attachment(s)






Here are pictures of our setup. We do have the three merry green lights and we have also used the code from the Robotic Eagles (love them).

http://team358.org/files/programming...2009-/LabVIEW/

Mark McLeod 02-02-2014 20:09

Re: Encoder Trouble
 
I assume you removed the 37-pin cable to the Digital Sidecar just for the photo?
Won't work without that.

P.S.
Appreciate the love:)

Michael U 02-02-2014 20:32

Re: Encoder Trouble
 
Yes, sorry about that we were doing some re-wiring at the time.

Mark McLeod 02-02-2014 21:06

Re: Encoder Trouble
 
The wiring looks good.
The encoder looks good.
The code looks good.

Next on the troubleshooting list is the 37-pin cable.
Look at the male end for bent or damaged pins.
Do you have another known good cable that you can swap with?

Check the Digital Module connection to the cRIO itself.
Take the module out and look for bent pins inside the cRIO side of the module connector.
Also check the pins on top of the Digital Module where the ribbon cable plugs in for bent or damaged pins.

After that would be the Digital Sidecar. Do you have another that you can swap out with?

BitTwiddler 02-02-2014 21:24

Re: Encoder Trouble
 
Quote:

Originally Posted by Michael U (Post 1336553)






Here are pictures of our setup. We do have the three merry green lights and we have also used the code from the Robotic Eagles (love them).

http://team358.org/files/programming...2009-/LabVIEW/

I think I spot a wiring error in your photograph. It appears you have the brown wire (ground) from the encoder going to the orange (signal) wire of your digital I/O port. I think you want the encoder blue wire going to the orange wire of the digital I/O PWM cable.
Oops, please disregard. I see you have the PWM connector turned around to account for that. No wiring error there. Sorry.

Alan Anderson 02-02-2014 21:52

Re: Encoder Trouble
 
The wires go to the right places, but I really wonder about your decision to use backwards coloring on the 3-pin connectors. That'll be a serious source of confusion for anyone looking at your connections. Brown to brown, red to red, and yellow to yellow makes a whole lot more sense than swapping brown and yellow in the middle of things.

yash101 02-02-2014 22:23

Re: Encoder Trouble
 
Time for some troubleshooting :D

So take a 2-channel oscilloscope and probe each output of the encoder. Turn the encoder/shaft/whatever. If you see a waveform on each channel that looks almost like a square wave, everything should be fine. Then, the problem is either code or those inputs are faulty.

If those inputs are faulty:
Try switching digital sidecars. if that fixes it, you're good to go. Otherwise, try swithing cables. That can be a problem! Go and use your engineer bains and troubleshoot :D


All times are GMT -5. The time now is 21:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi