Go to Post I haven't seen it yet, but I have complete confidence in him, because he is Andy Baker. - Alan Anderson [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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 16-03-2013, 16:50
Todd's Avatar
Todd Todd is offline
Software Engineer
FRC #1071 (Team Max)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Connecticut, Wolcott
Posts: 51
Todd is just really niceTodd is just really niceTodd is just really niceTodd is just really niceTodd is just really nice
Re: CAN and Jaguars, any limits?

In general you can start running into trouble trying to send lots of CAN commands in your teleop loop. We offload our CAN messages into other processing loops and run them with lesser periodicity. Many motors shouldn't really need to have their speed changed more rapidly than 10-20 hz, and if you had a motor that you wanted to control the speed of more frequently than that, you could have that motor alone operate faster.

You didn't actually say whether or not you're actually doing something like this already, but in case you're not.

The same basic issue is relevant and correctable regardless of what programming language you're using.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-03-2013, 18:13
Jefferson Jefferson is online now
Registered User
AKA: Jeff Clements
FRC #0016 (Bomb Squad)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Mountain Home, AR
Posts: 257
Jefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant future
Re: CAN and Jaguars, any limits?

Quote:
Originally Posted by Todd View Post
We offload our CAN messages into other processing loops and run them with lesser periodicity.
Would you be willing to provide some sample code of how you accomplish this?
Reply With Quote
  #3   Spotlight this post!  
Unread 17-03-2013, 23:25
Todd's Avatar
Todd Todd is offline
Software Engineer
FRC #1071 (Team Max)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2004
Location: Connecticut, Wolcott
Posts: 51
Todd is just really niceTodd is just really niceTodd is just really niceTodd is just really niceTodd is just really nice
Re: CAN and Jaguars, any limits?

Quote:
Originally Posted by Jefferson View Post
Would you be willing to provide some sample code of how you accomplish this?
What programming language are you using?

As a trivial example, if in LabVIEW one were to determine in each robot mode (disabled, teleop, autonomous, etc) the command they wanted to send a motor and store it in a global variable, they could then read that global variable in timed tasks in a loop at whatever frequency they wished and call the set motor VI from there.

This can help free your Teleop loop to run as fast as ds packets are received.

Similar trivial examples can be constructed in C++ and Java.

There are a lot better ways that this could be handled, like using an action engine in LabVIEW, or a class in any other language rather than a global variable, but the general principle remains the same.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-03-2013, 14:43
Jefferson Jefferson is online now
Registered User
AKA: Jeff Clements
FRC #0016 (Bomb Squad)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Mountain Home, AR
Posts: 257
Jefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant futureJefferson has a brilliant future
Re: CAN and Jaguars, any limits?

We use C++.
After posting that comment, I did some digging and found a post from bob.wolff68 with some examples from the Janksters. Here it is:

http://www.chiefdelphi.com/forums/sh...87&postcount=2

Nice, easy implementation of tasks there. Got it running last night to monitor a digitial input that was changing too quickly for the command to reliably catch.
Reply With Quote
  #5   Spotlight this post!  
Unread 18-03-2013, 17:08
brennonbrimhall brennonbrimhall is offline
Free Agent
AKA: Brennon Brimhall
no team
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Clifton Park, NY
Posts: 222
brennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to allbrennonbrimhall is a name known to all
Re: CAN and Jaguars, any limits?

Team 20 has had lots of ups and downs with CAN over the last two years too.

From a programming standpoint, CAN commands are routed through several different plugins from the cRIO to the Jags themselves, depending on what language you use. Some teams with really awesome software mentors have developed their own drivers for CAN. Maybe that's a route you want to pursue?
__________________
Team 20, 2012-2014: 4 blue banners, 5 medals, and 9 team awards.
Church of Jesus Christ of Latter-day Saints, 2014-2016: Missionary, Colorado Denver South Mission.
Reply With Quote
  #6   Spotlight this post!  
Unread 04-04-2013, 12:12
Mike9966's Avatar
Mike9966 Mike9966 is offline
Mentor Mike
FRC #2846 (Fire Bears)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Minnesota
Posts: 62
Mike9966 is an unknown quantity at this point
Re: CAN and Jaguars, any limits?

Well, this is anecdotal in nature, but after our competition at 10000 Lakes where we removed 3 of the jags from the CAN bus and put them on PWM, the other 8 worked very well.
Our bot drove well, and was responsive.
I would like to revisit this someday with better diagnostic tools available, but for now, I'm just going to say that for us, the max number of jags on the bus will be 8. More than that will have to go on PWM.

Thanks for all your thoughts everyone, and if I am able to better analyze this someday, I'll be sure to let you know the results.

Mike
__________________
Do the best you can! Always
Go FireBears
2009 10000 Lakes Finalists, thanks 2825 & 2177
2010 10000 Lakes quarter finalists
2011 Duluth and 10000 Lakes
2012 Superior, and 10K Lakes, Qt finals, MRI
2013 Northern lights, 10K Lakes-Semi finalists, MRI, River Rendezvous, Minne Mini
2014 Northern Lights, 10K Lakes
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 23:09.

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