Go to Post I'm always afraid of what the GDC will come up with... Their sanity is often questioned... :D - thefro526 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 30-01-2016, 09:37
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Talon SRX Labview Coding

We are a rookie team and don't know much about coding but we have set up 4 Talon SRX motor controllers on our robot and all are wired correctly using the CAN and daisy chaining them. I believe the error is in the code, we referred to the software manual to make this and we are getting various errors. Initially we have 2 motors on each side of our drive train so we are going to use the "slave method" for the second motor on each side. Once enabled we have two motor controllers LEDs light up solid orange and the other two alternate orange. In the manual it says there is damaged hardware but i think this is improbable. here is the code and the drive station error
https://www.dropbox.com/s/s1mz0oq0py...81%29.png?dl=0
https://www.dropbox.com/s/ek5xmqjr88...82%29.png?dl=0
  #2   Spotlight this post!  
Unread 30-01-2016, 10:03
SpazticJenga's Avatar
SpazticJenga SpazticJenga is offline
Registered User
AKA: Coleman Cook
FRC #0034 (Rockets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Athens, AL
Posts: 2
SpazticJenga is an unknown quantity at this point
Re: Talon SRX Labview Coding

First of all, You are opening your motor controllers in Teleop, which constantly designates the motor controller positions every 10 ms, instead of in begin, where it is only designated once. I would recommend moving the code where you opened the Talon SRX's to begin, so that way you are designating the robot's software location only once.

What's currently happening is that your master motors are opening, but your slave motors do not know that they are slaved, and therefore aren't opening. Solid orange states that the motors are being designated in teleop, while flashing states that they are undesignated in code. Once they are all solid orange, you have opened all motors in code.
  #3   Spotlight this post!  
Unread 30-01-2016, 10:16
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by SpazticJenga View Post
First of all, You are opening your motor controllers in Teleop, which constantly designates the motor controller positions every 10 ms, instead of in begin, where it is only designated once. I would recommend moving the code where you opened the Talon SRX's to begin, so that way you are designating the robot's software location only once.

What's currently happening is that your master motors are opening, but your slave motors do not know that they are slaved, and therefore aren't opening. Solid orange states that the motors are being designated in teleop, while flashing states that they are undesignated in code. Once they are all solid orange, you have opened all motors in code.
So i moved the signatures to begin and it is the same reaction.

Last edited by Coach Seb : 30-01-2016 at 10:23.
  #4   Spotlight this post!  
Unread 30-01-2016, 10:23
SpazticJenga's Avatar
SpazticJenga SpazticJenga is offline
Registered User
AKA: Coleman Cook
FRC #0034 (Rockets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Athens, AL
Posts: 2
SpazticJenga is an unknown quantity at this point
Re: Talon SRX Labview Coding

Have you addressed the Talon SRX's in the NI MAX web address? If not, you need to open a web browser with microsoft silverlight and type in your Robo-Rio's IP, and then select the Talons and set their locations.
  #5   Spotlight this post!  
Unread 30-01-2016, 10:27
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,906
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Talon SRX Labview Coding

Any particular reason that you aren't starting with the default project?
It does everything you need except you have to change "Open 2 motors" to "Open 4 Motors" in Begin.vi
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 30-01-2016, 10:29
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by SpazticJenga View Post
Have you addressed the Talon SRX's in the NI MAX web address? If not, you need to open a web browser with microsoft silverlight and type in your Robo-Rio's IP, and then select the Talons and set their locations.
Do you mean make them have individual IDs because I have done that?
  #7   Spotlight this post!  
Unread 30-01-2016, 10:35
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: 549
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 Labview Coding

Quote:
and the other two alternate orange. In the manual it says there is damaged hardware but i think this is improbable. here is the code and the drive station error
The Talon SRX User's Guide says Orange blink means CAN bus detected, robot disabled. Please review Section 2.3 in the Talon SRX User's Guide.

Section 16.3 in the Talon SRX Software Reference Manual has a suggestion for why your Talon is blinking orange instead of solid-orange.

Instructions for assigning device IDs and firmware-updating (must do both) are in Section 2 of the Talon SRX Software Reference Manual. Ids must be unique (Section 2.2).

Also there are FRC examples here...
https://github.com/CrossTheRoadElec
  #8   Spotlight this post!  
Unread 30-01-2016, 10:39
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by Mark McLeod View Post
Any particular reason that you aren't starting with the default project?
It does everything you need except you have to change "Open 2 motors" to "Open 4 Motors" in Begin.vi
yeah but we have a CAN network not PWM, how would you change that?
  #9   Spotlight this post!  
Unread 30-01-2016, 10:43
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: 549
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 Labview Coding

Quote:
Originally Posted by Coach Seb View Post
Do you mean make them have individual IDs because I have done that?
Did you also update the firmware? Also the wire overlap in the screenshot makes it difficult to confirm that the "Device ID" and "Master Device Number to follow" signals are not flipped around.

So in the roboRIO web-based config, there are a total of four Talons with IDS 1,2,3,4 then?
  #10   Spotlight this post!  
Unread 30-01-2016, 10:46
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by ozrien View Post
Did you also update the firmware? Also the wire overlap in the screenshot makes it difficult to confirm that the "Device ID" and "Master Device Number to follow" signals are not flipped around.

So in the roboRIO web-based config, there are a total of four Talons with IDS 1,2,3,4 then?
yes the talons all have individual IDs 1-4, and when enabled there are two mcs that light up solid orange and 2 that are alternate orange. The firmware is also fully updated
  #11   Spotlight this post!  
Unread 30-01-2016, 14:17
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: 549
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 Labview Coding

Works for me - I posted a quick example as a sanity check (I used slightly different IDs).
https://github.com/CrossTheRoadElec/...ollowerExample
  #12   Spotlight this post!  
Unread 30-01-2016, 14:44
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by ozrien View Post
Works for me - I posted a quick example as a sanity check (I used slightly different IDs).
https://github.com/CrossTheRoadElec/...ollowerExample
my code is identical and it still is reacting the same however i saw you had some java CAN script.. Is that necessary?
  #13   Spotlight this post!  
Unread 30-01-2016, 14:48
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: 549
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 Labview Coding

The LabVIEW_CANTalonFollowerExample folder contains a complete LV project. The sibling folders contain other LV, Java, and C++ projects, they are not involved.

You should consider trying this proven example (after adjusting the IDs), if the issue goes away then better study the differences. if the issue is still present, then you've ruled out software.
  #14   Spotlight this post!  
Unread 30-01-2016, 15:55
Coach Seb's Avatar
Coach Seb Coach Seb is offline
Registered User
AKA: Sebastien Cournoyer
FRC #5860 (Full Metal Muskrats)
Team Role: Coach
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Algonac, MI
Posts: 121
Coach Seb is an unknown quantity at this point
Re: Talon SRX Labview Coding

Quote:
Originally Posted by ozrien View Post
The LabVIEW_CANTalonFollowerExample folder contains a complete LV project. The sibling folders contain other LV, Java, and C++ projects, they are not involved.

You should consider trying this proven example (after adjusting the IDs), if the issue goes away then better study the differences. if the issue is still present, then you've ruled out software.
I took the set up down to one master and one slave. now we have both at a solid orange and on the web interfavce it say it is working properly however we cant get any joystick/mootor response. the driver station is giving the error that a pwm channel is not allocated. but we dont have any pwm
  #15   Spotlight this post!  
Unread 30-01-2016, 16:14
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: 549
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 Labview Coding

It sounds there is something in your LV app that is referencing PWM. Maybe the default ArcadeDrive control is still referenced somewhere. Or some test code somewhere. This is why I suggested using the known-working-example first to determine the root-cause of the first issue you mentioned. It sounds like there are multiple problems.

If you post a screenshot, that might help determine what the PWM error is about.
Closed Thread


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 01:32.

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