Go to Post It's possible to do nearly anything with enough resources and ingenuity. - Madison [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 21-06-2011, 19:05
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Jaguar communication issue

Hello,

While trying out some drive code, I have had problems with one of our four Jaguars that control the four drive motors. I have verified that the wiring is correct multiple times, and when the robot is enabled the LED on the Jaguar is a solid amber - indicating a connection to the cRIO. However, when I should be sending power to the motor, the LED still indicates a solid amber instead of green or red.

Frankly, I cannot find any fault with my code, but that seems to be the only possible thing. I have tested out other code with the same Jaguar, and it responded, so it cannot be a problem with the Jaguar. I've attached pictures of my LabVIEW code in the Begin.vi and Teleop.vi. I am honestly stumped. Can any of you guys help?
Attached Thumbnails
Click image for larger version

Name:	screenshot.291.jpg
Views:	97
Size:	16.1 KB
ID:	10777  Click image for larger version

Name:	screenshot.292.jpg
Views:	38
Size:	22.8 KB
ID:	10778  
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)

Last edited by kenavt : 21-06-2011 at 19:07. Reason: Added pictures
  #2   Spotlight this post!  
Unread 21-06-2011, 22:31
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Jaguar communication issue

Quote:
Originally Posted by kenavt View Post
Hello,

While trying out some drive code, I have had problems with one of our four Jaguars that control the four drive motors. I have verified that the wiring is correct multiple times, and when the robot is enabled the LED on the Jaguar is a solid amber - indicating a connection to the cRIO. However, when I should be sending power to the motor, the LED still indicates a solid amber instead of green or red.

Frankly, I cannot find any fault with my code, but that seems to be the only possible thing. I have tested out other code with the same Jaguar, and it responded, so it cannot be a problem with the Jaguar. I've attached pictures of my LabVIEW code in the Begin.vi and Teleop.vi. I am honestly stumped. Can any of you guys help?
First off, do you have the right pwm cable connected, and connected in the right way? Is your joystick code correct as well? Are your jaguars calibrated? I would assume so. I remember having a problem similar to this, this past season. We killed one jaguar because we forgot to calibrate, so one jaguar killed another. I remember we also played around with what jaguar got what motor. If you try switching around the pwm cables to different jaguars, that can possibly work.
The last thing i can think of in LabVIEW, would be to see what the motor output is. I don't really remember how to do it as the programming computer is not with me, but i think you right click a wire in the code, and something is an option that allows you to see the number/output of something like a jaguar or the speed applied when the joystick is pushed. I think you would have to put it on the wire that is connected from motor to set motor in the teleop code. Not exactly sure as I only learned how to do that at the competition when i had a programming alumni present to help me out.
Let me know how things go
  #3   Spotlight this post!  
Unread 21-06-2011, 22:51
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Jaguar communication issue

Quote:
Originally Posted by jhellr13 View Post
First off, do you have the right pwm cable connected, and connected in the right way? Is your joystick code correct as well? Are your jaguars calibrated? I would assume so. I remember having a problem similar to this, this past season. We killed one jaguar because we forgot to calibrate, so one jaguar killed another. I remember we also played around with what jaguar got what motor. If you try switching around the pwm cables to different jaguars, that can possibly work.
The last thing i can think of in LabVIEW, would be to see what the motor output is. I don't really remember how to do it as the programming computer is not with me, but i think you right click a wire in the code, and something is an option that allows you to see the number/output of something like a jaguar or the speed applied when the joystick is pushed. I think you would have to put it on the wire that is connected from motor to set motor in the teleop code. Not exactly sure as I only learned how to do that at the competition when i had a programming alumni present to help me out.
Let me know how things go
Let me try to address the things you've brought up one by one (I'm trying to cross potential problems off of my list):

-I have verified the wiring from the cRIO to the Digital Sidecar and through the PWMs to the Jaguar.
-What do you mean by calibrating Jaguars? I thought they were set to go out of the box.
-Frankly, I doubt switching around PWMs should make any difference. All the Jaguars are the same, right? Or at least they should be.
-I haven't "probed" - that's the word you are looking for - the output wire to the SetOutput.vi while the robot's been running. However, looking at my code, I am most definitely not sending "0s", as my team would say, to the Jaguar.

Because previous code (our competition 2011 code) used that Jaguar as expected, I am guessing the problem has to do with how I am assigning PWM channels. That is why I attached the image of my Begin.vi.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #4   Spotlight this post!  
Unread 21-06-2011, 23:03
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Jaguar communication issue

Quote:
Originally Posted by kenavt View Post
Let me try to address the things you've brought up one by one (I'm trying to cross potential problems off of my list):

-I have verified the wiring from the cRIO to the Digital Sidecar and through the PWMs to the Jaguar.
-What do you mean by calibrating Jaguars? I thought they were set to go out of the box.
-Frankly, I doubt switching around PWMs should make any difference. All the Jaguars are the same, right? Or at least they should be.
-I haven't "probed" - that's the word you are looking for - the output wire to the SetOutput.vi while the robot's been running. However, looking at my code, I am most definitely not sending "0s", as my team would say, to the Jaguar.

Because previous code (our competition 2011 code) used that Jaguar as expected, I am guessing the problem has to do with how I am assigning PWM channels. That is why I attached the image of my Begin.vi.
According to what you have said, I think the Jaguar is fine. Plus is you used it for competition they are definitely calibrated then. If you didnt know, to calibrated you take a small pin and put it in the reset hole. Then you wait for it to blink. Then you just push the joystick forward, neutral, then back, then release pin.
Are you sure pwm is only for that Jaguar and not used for something else?
The last thing I can think of is the following. If this Jaguar is for your drivetrain, then you have it programmed wrong. If it is just for a window motor which should he attached to a spike relay, you also have it wrong. What exactly are you using this Jaguar for? I probably should've asked that in my first response.
  #5   Spotlight this post!  
Unread 22-06-2011, 08:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,712
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: Jaguar communication issue

Did you accidentally open PWM2 for some other device as well?

It's often not the code you are focused on that causes problems, but the code you dismiss out of hand as "unrelated".
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #6   Spotlight this post!  
Unread 22-06-2011, 18:48
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Jaguar communication issue

Quote:
Originally Posted by jhellr13 View Post
According to what you have said, I think the Jaguar is fine. Plus is you used it for competition they are definitely calibrated then. If you didnt know, to calibrated you take a small pin and put it in the reset hole. Then you wait for it to blink. Then you just push the joystick forward, neutral, then back, then release pin.
Are you sure pwm is only for that Jaguar and not used for something else?
The last thing I can think of is the following. If this Jaguar is for your drivetrain, then you have it programmed wrong. If it is just for a window motor which should he attached to a spike relay, you also have it wrong. What exactly are you using this Jaguar for? I probably should've asked that in my first response.
I am using the Jaguar for a drivetrain CIM motor. Frankly, I've never had different programming for different motors, so I am not entirely sure what you mean.

Quote:
Originally Posted by Mark McLeod View Post
Did you accidentally open PWM2 for some other device as well?

It's often not the code you are focused on that causes problems, but the code you dismiss out of hand as "unrelated".
No, I've only opened PWM2 once. Woah, that scared me for a second.

An additional thing I should note was that once I removed code from the Disabled.vi and PeriodicTasks.vi dealing with the two motors (no longer referenced in the Begin.vi) from the demo code, I have no errors pop up when operating the robot. Before I removed that code, I had many, many errors from those two pieces of code.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #7   Spotlight this post!  
Unread 22-06-2011, 21:00
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Jaguar communication issue

If you are using it for a drivetrain, your code in the begin vi should be either he arcade or tank block.
  #8   Spotlight this post!  
Unread 22-06-2011, 21:35
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Jaguar communication issue

Quote:
Originally Posted by jhellr13 View Post
If you are using it for a drivetrain, your code in the begin vi should be either he arcade or tank block.
Actually, I believe that is only for the Teleop.vi - not when initializing PWM channels. Also, the whole point of my program is to test different drive system code, not the basic tank/arcade/holonomic code.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #9   Spotlight this post!  
Unread 22-06-2011, 22:48
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Jaguar communication issue

Quote:
Originally Posted by kenavt View Post
Actually, I believe that is only for the Teleop.vi - not when initializing PWM channels. Also, the whole point of my program is to test different drive system code, not the basic tank/arcade/holonomic code.
For a drivetrain code, whatever the drive code (arcade, tank. holonomic) is placed in the begin vi. On that block, the pwm cables are assigned for each jaguar controlling the CIM motors. In teleop, that is where you initiate the drive system and make it controllable by a joystick. As a heads up, if you are doing omni wheel or mecanum, remember that those drive systems have 3 axis. Forward, back, and strafe.
If you need some help because it seems like you might be confused, check out this link. It is the team website for Mark McLeod's team up above. They have a great resource for LabVIEW programming on any topic and it was a great help for me this year, and certainly help you out right now.
http://team358.org/files/programming...2009-/LabVIEW/
  #10   Spotlight this post!  
Unread 23-06-2011, 08:44
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Jaguar communication issue

Quote:
Originally Posted by jhellr13 View Post
For a drivetrain code, whatever the drive code (arcade, tank. holonomic) is placed in the begin vi. On that block, the pwm cables are assigned for each jaguar controlling the CIM motors. In teleop, that is where you initiate the drive system and make it controllable by a joystick. As a heads up, if you are doing omni wheel or mecanum, remember that those drive systems have 3 axis. Forward, back, and strafe.
If you need some help because it seems like you might be confused, check out this link. It is the team website for Mark McLeod's team up above. They have a great resource for LabVIEW programming on any topic and it was a great help for me this year, and certainly help you out right now.
http://team358.org/files/programming...2009-/LabVIEW/
Frankly, I've never seen anyone place drive code in the Begin.vi - it was my understanding that was for initializing PWM channels, not putting drive code in Robot Main.vi at that point. You may be talking about the Open 4 Motor.vi, which frankly shouldn't be neccessary - I can open individual motors just as easily.

I may seem confused because I believe that I am initializing PWM channels correctly for each individual motor, but nothing seems to be allocated. That website is a great resource, though. I'll be sure to look through that.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
  #11   Spotlight this post!  
Unread 23-06-2011, 10:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,712
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: Jaguar communication issue

If you set the motor output in more than one place, especially in someplace like Periodic Tasks, then it could be overriding your Teleop Motor Set and keeping PWM2 in neutral.

I assume the rest of Teleop has a simple straight-through dataflow, without loops or delays.

You might try a step-by-step troubleshooting approach.
  1. Create a new project from scratch
  2. Don't change the existing code, leave the default drive motors, code in Disable, etc.
  3. Add just your new Jaguar out on an unused PWM with a new joystick control.
  4. See if that works.
  5. Step-by-step begin to remove the default code, and changing the code over to resemble what you are having trouble with now.
  6. Test at each change, e.g, 1) just remove the old drive motors, 2) test, 3) relocate your single Jag to PWM2, 4) test, 5) remove the code throwing errors in Disable, 6) test, and so on.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-06-2011 at 10:53.
  #12   Spotlight this post!  
Unread 23-06-2011, 11:01
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Jaguar communication issue

Quote:
Originally Posted by kenavt View Post
Frankly, I've never seen anyone place drive code in the Begin.vi - it was my understanding that was for initializing PWM channels, not putting drive code in Robot Main.vi at that point. You may be talking about the Open 4 Motor.vi, which frankly shouldn't be neccessary - I can open individual motors just as easily.
If you're going to be using the provided tank, arcade, or omni drive functions, you need to define the drivebase motors using an Open 4 Motor (or Open 2 Motor) function. Opening the motors individually is a little more work, and if they are opened individually then controlling them appropriately is even more work.

Quote:
I may seem confused because I believe that I am initializing PWM channels correctly for each individual motor, but nothing seems to be allocated.
You haven't shown us the rest of your code, so we can't do much to help you debug it. You also haven't indicated whether or not you've done any troubleshooting, either by "probing" the value going to the Motor Set or by swapping wires around to see if the problem stays with the Digital Sidecar's PWM output or with the Jaguar.
  #13   Spotlight this post!  
Unread 23-06-2011, 23:10
sithmonkey13's Avatar
sithmonkey13 sithmonkey13 is offline
Registered User
AKA: Nathan
FRC #1178 (DURT)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: St. Louis
Posts: 70
sithmonkey13 is a name known to allsithmonkey13 is a name known to allsithmonkey13 is a name known to allsithmonkey13 is a name known to allsithmonkey13 is a name known to allsithmonkey13 is a name known to all
Re: Jaguar communication issue

Check the connection between the PWM cable and the Jaguar. We have had problems with this before, and as a result, we always hot glue the cables to the Jaguars, as driving in a match could shake the PWM cables loose.
__________________
Note: You cannot tell the difference between "OK Go" and "OK No" when there 2 walls between you and the robot. At that point, the only thing between injury and safety for the mechanical guys is their ninja skills.
  #14   Spotlight this post!  
Unread 23-06-2011, 23:20
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Jaguar communication issue

Quote:
Originally Posted by sithmonkey13 View Post
Check the connection between the PWM cable and the Jaguar. We have had problems with this before, and as a result, we always hot glue the cables to the Jaguars, as driving in a match could shake the PWM cables loose.
We also hot glue the pwm cables. This year we even made a lexan casing that went around the electronic part of our robot. Because it was clear, the refs and everybody could see our electronics, but the tubes couldn't get stuck in the cables. The casing had a hole for the light, and a slit where the power switch was available. We put velcro around it, so it easily came on and off.
  #15   Spotlight this post!  
Unread 30-06-2011, 22:12
kenavt's Avatar
kenavt kenavt is offline
Registered User
AKA: Colin S
no team
Team Role: Alumni
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Ann Arbor
Posts: 253
kenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond reputekenavt has a reputation beyond repute
Re: Jaguar communication issue

I've had a busy last week(two robotics demos, the offseason MARC competition), but I tried the code with a different cRIO, Digital Sidecar, and Jaguars. I had the same result happen where the PWM channel seemed to be allocated incorrectly, so I talked through my drive code with a recently graduated programmer. We isolated the issue to a wrongly attached wire, automatically sending null commands to the Jaguar. So, that was the issue after all.

Thanks a lot for the help anyway. I've learned a bit about debugging, and hopefully I'll be able to bring this knowledge forward into my next project, next build season, and beyond.
__________________
University of Michigan Computer Engineering '17

FRC 2337 student alumni (2010-2013)
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 10:26.

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