Go to Post They're just dots. You can get them back. - Brandon Martus [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 19-03-2011, 16:50
pianogrrl71's Avatar
pianogrrl71 pianogrrl71 is offline
Registered User
AKA: Jaden
FRC #3504 (Girls of Steel)
Team Role: Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Pittsburgh
Posts: 27
pianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud ofpianogrrl71 has much to be proud of
Help! Velocity control with Jaguars and CAN

If you are using two jags to control two motors and one gear box, how do you use the jaguar in position or speed control?

Our system is using two jags to power two CIMs and one CIMple gearbox, with one US Digital encoder.

So we were trying to tune the PID for our drive, and it was printing the speed and position the first time. However, it would only do it the first time it went though, because we had a function that cleared the driver station LCD and it wouldn't print anything after we ran that. We're also using JAVA and Netbeans.

We eventually figured out that it was a can timeout exception when we left our coding computer plugged in. Then we kept getting CAN-time exceptions. We thought we were overloading them so we put it in delays -- big delays too, like 0.1. We've tried uncommenting and commenting things and breaking up the try-catch it was erroring in. They seemed to change almost randomly, printing the speed or position for a few seconds before erroring and still moving but not giving us back the values. So we think we could set them always, just not get them....

When we took out the delays and slave motors, it worked, but we don't want to do that because it might burn out the slave motors. We're really confused as what to do, and we don't even really know what the problem is.... so if anything needs clarification....

Thank you!!!
  #2   Spotlight this post!  
Unread 19-03-2011, 18:48
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Help! Velocity control with Jaguars and CAN

Not sure exactly what you're looking for, but I think you were asking how teams handled the situation of having multiple drive motors physically connected together and doing closed loop speed control.

On my team, we offloaded the PID control to the robot side of things. We use the encoders connected straight to the Jaguar for logical and wiring simplicity, and query them on the current rate through CAN, then use our own PID code to adjust the output of the Jaguars based on the encoder feedback, and using the PercentVbus control mode, which allows us to command the Jaguars to a certain proportion of their maximum output. We also make use of the Jaguar sync groups to keep them updating together. We wanted to implement a balancing scheme based on current flow, but that's been bumped to an off season project due to time.

As far as your problems go, it sounds like you have spotty communications, make sure your motors aren't fighting each other (which could cause overcurrent faults and voltage dips), make sure your CAN network is properly terminated (an unterminated network can have all kinds of weirdness due to communication breakdown). For reference we use a similar delay of about 0.05 in our code to prevent CAN overload.

Good luck,
Matt
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #3   Spotlight this post!  
Unread 19-03-2011, 20:49
Deetman Deetman is offline
Registered User
AKA: Kevin Dieterle
no team
 
Join Date: Apr 2004
Rookie Year: 2004
Location: Philadelphia, PA
Posts: 203
Deetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond reputeDeetman has a reputation beyond repute
Re: Help! Velocity control with Jaguars and CAN

I'm not sure but it sounds like you are using the encoders connected to one Jaguar per drivetrain side and then syncing them via the cRIO. There was some extensive discussion on doing this in this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=89282

One thing to note is that attaching the encoders directly to the Jaguars can introduce ground loops and noise into the system, which could potentially cause the Jaguars to fault. As shown on the 4th page of that thread a solution was posted in schematic form that eliminates these ground loops and attempts to alleviate some of the potential noise issues.

Obviously I can't say for sure what is causing your issues but that thread has some great discussion on the issues with what you are trying to do and potential solutions that may help you out.
__________________

FIRST Mid-Atlantic Volunteer (2012-present)
Team 1014 Alumni (2004-2005)
Team 1712 Mentor (2011-2015)
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 03:46.

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