|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
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? Last edited by kenavt : 21-06-2011 at 19:07. Reason: Added pictures |
|
#2
|
|||
|
|||
|
Re: Jaguar communication issue
Quote:
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
|
|||||
|
|||||
|
Re: Jaguar communication issue
Quote:
-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. |
|
#4
|
|||
|
|||
|
Re: Jaguar communication issue
Quote:
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
|
|||||
|
|||||
|
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". |
|
#6
|
|||||
|
|||||
|
Re: Jaguar communication issue
Quote:
Quote:
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. |
|
#7
|
|||
|
|||
|
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
|
|||||
|
|||||
|
Re: Jaguar communication issue
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.
|
|
#9
|
|||
|
|||
|
Re: Jaguar communication issue
Quote:
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
|
|||||
|
|||||
|
Re: Jaguar communication issue
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. That website is a great resource, though. I'll be sure to look through that. |
|
#11
|
|||||
|
|||||
|
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.
Last edited by Mark McLeod : 23-06-2011 at 10:53. |
|
#12
|
|||||
|
|||||
|
Re: Jaguar communication issue
Quote:
Quote:
|
|
#13
|
||||
|
||||
|
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.
|
|
#14
|
|||
|
|||
|
Re: Jaguar communication issue
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
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|