Go to Post The only odd part about this competition is that rather than further convince me that I want to be an engineer, it did the converse... I want to be a teacher. - pauluffel [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-09-2015, 20:33
entertainr entertainr is offline
Build Addicted
AKA: Levi
FRC #4522 (Team SCREAM)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Sedalia
Posts: 7
entertainr is an unknown quantity at this point
Talon SRX Encoder Signal Processing Trouble

Recently my team has decided to switch to Talon SRX controllers. I've been moving slowly towards working with the PID controls on them, but I have a problem. Whenever I run the motors forward, the encoder counts backwards. When I run the motors in reverse, the encoder counts up. The CTR Reference Manual labels this as a problem if I want to use the closed loop features. I have attempted to use the SetReference.vi as suggested in the manual with no success. I am using a Grayhill 63R 256 count digital encoder. The wiring has been done correctly from the Grayhill to the breakout board.

http://www.grayhill.com/assets/1/7/Opt_Encoder_63R.pdf
Attached Thumbnails
Click image for larger version

Name:	Begin.PNG
Views:	40
Size:	4.4 KB
ID:	19300  Click image for larger version

Name:	Periodic Tasks.PNG
Views:	29
Size:	1.9 KB
ID:	19301  Click image for larger version

Name:	Publishing.PNG
Views:	33
Size:	3.7 KB
ID:	19302  
Reply With Quote
  #2   Spotlight this post!  
Unread 22-09-2015, 00:03
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 524
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Talon SRX Encoder Signal Processing Trouble

Can you check the self test to see if the reverse-setting is taking effect (see screenshot in Section 7.4. Reversing sensor direction, best practices.). Is the Selected Sensor Pos the inverse or equal to the Quad Pos?

Be sure enable the robot (even briefly) to allow settings to pass into Talon. See Section 16.2 for details.
Reply With Quote
  #3   Spotlight this post!  
Unread 22-09-2015, 00:06
ozrien's Avatar
ozrien ozrien is online now
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 524
ozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond reputeozrien has a reputation beyond repute
Re: Talon SRX Encoder Signal Processing Trouble

I just noticed your third screenshot. Pull out "Sensor Position" from the "unbundle by name" object instead of "Quad Position". Section 16.9 explains it better, but "Sensor Position" is what is used in the internal closed-loop.
Reply With Quote
  #4   Spotlight this post!  
Unread 22-09-2015, 11:22
FrankJ's Avatar
FrankJ FrankJ is offline
Robot Mentor
FRC #2974 (WALT)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2009
Location: Marietta GA
Posts: 1,933
FrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond reputeFrankJ has a reputation beyond repute
Re: Talon SRX Encoder Signal Processing Trouble

A hardware fix: It is a little messy but you could swap the A & B input wires? I prefer to fix thing like this in software & leave the hardware standard, but there are other view points.
__________________
If you don't know what you should hook up then you should read a data sheet
Reply With Quote
  #5   Spotlight this post!  
Unread 22-09-2015, 16:54
entertainr entertainr is offline
Build Addicted
AKA: Levi
FRC #4522 (Team SCREAM)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Sedalia
Posts: 7
entertainr is an unknown quantity at this point
Re: Talon SRX Encoder Signal Processing Trouble

Quote:
Originally Posted by FrankJ
It is a little messy but you could swap the A & B input wires?
That might work, and if worse comes to worst I'm willing to try it. I would prefer to know how to fix it in the software though, especially considering there is a function made specifically for this, and it will be much easier to solve if we come across this problem again.
Reply With Quote
  #6   Spotlight this post!  
Unread 22-09-2015, 21:17
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: Talon SRX Encoder Signal Processing Trouble

Quote:
Originally Posted by FrankJ View Post
A hardware fix: It is a little messy but you could swap the A & B input wires? I prefer to fix thing like this in software & leave the hardware standard, but there are other view points.
(For completeness-) Or switch the motor leads.
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor
Reply With Quote
  #7   Spotlight this post!  
Unread 24-09-2015, 11:56
entertainr entertainr is offline
Build Addicted
AKA: Levi
FRC #4522 (Team SCREAM)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Sedalia
Posts: 7
entertainr is an unknown quantity at this point
Re: Talon SRX Encoder Signal Processing Trouble

I finally found the problem this morning.

My original problem was that I didn't know the Talon Set Reference vi doesn't come with a Talon Send vi inside of it, and you need the Send vi to save any changes, such as the Reverse Feedback Sensor setting.

In some of my earlier attempts to fix this issue on my own, I placed a SetReference in disabled to try and update the value outside of Begin.vi. It didn't work when I set it to true and I didn't know why. I found out later when Omar Zrien pointed out Section 21.20 of the CTR Software Manual to me, but at that time, I thought setting the value to false might fix it somehow. It didn't, so I promptly forgot about it and let it sit as a false constant.

While working with Omar, I learned about Section 21.20, so I added the Talon Send vi in the Set Reference vi and placed it in Teleop to constantly update the value. I noticed something was fighting it, as if there was another value being sent to it (Hello Disabled!). I did a search, found my chunk of code in Disabled, and quickly removed it.

Another redeployment confirmed that my problem was solved. Thanks so much to everyone for helping out, and special thanks to Omar Zrien for working directly with me to figure it out!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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