Go to Post FIRST games are complex and rely on design and intellectual capability much more than the average sport. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #17   Spotlight this post!  
Unread 05-08-2010, 18:02
Mike Copioli's Avatar
Mike Copioli Mike Copioli is offline
You make it pretty We make it dance
no team (Retired(3539, 217))
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2001
Location: Romeo
Posts: 453
Mike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond reputeMike Copioli has a reputation beyond repute
Re: CAN Nerf Robot

Quote:
Originally Posted by Radical Pi View Post
Request messages would still be blocking, right? Having some sort of asynchronous request system would be IMO an annoyance for programming and would just confuse people trying to use CAN in their code.
Requests do not have to be blocking. The gateway device could simply dump the result of the request, say current from JAG 1, 2, 3, 4... into a buffer over TCP/IP/UDP or serial. A buffer would have to exist on the application side that holds the data. A ring buffer(fifo) would work fine for this task. Basically the application requests current from the Jags, then proceeds to the next task, when the data is available a flag is set notifying the application that new data is available. The application then pops the data from the FIFO. This is probably not even necessary though. The blocking time would not be very long for even a dozen requests, sub mS. The whole process could be run on it's own thread anyway. The point is to let the CAN BUSS do all the dirty work.

Imagine this scenario:

-CAN GYRO
-CAN ADC
-CAN QUAD ENCODER
-CAN SPEED CONTROLLER

-CAN gyro node performs all of the integration math for calculating angular position.

-CAN ADC performs all of the ADC sampling and averaging and could provide position, velocity or raw analog value.

-CAN quad encoder node decodes all quadrature encoder data and provides position and velocity.

The CAN nodes will now have the functionality of sending traffic to and from each other instead of back and forth to/from the application. I want to servo speed controller 1 to the position returned by the ADC or Quadrature module. You get the idea.
__________________
Mike Copioli
CTRE Hardware Engineer
http://www.ctr-electronics.com

Team 3539 The Byting Bull Dogs
2013 Michigan State Champions
Team 217 The Thunder Chickens
2006 World Champions
2008 World Champions
2009 Michigan State Champions
Reply With Quote
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nerf Gun War! kristenliz_28 Chit-Chat 7 23-01-2010 13:29
pic: Nerf Attack petek Extra Discussion 8 19-04-2006 23:35
Anyone thinking NERF ball turret teh_masterer Technical Discussion 30 15-01-2006 21:40
NERF fatigue? Mme.Miscellania Technical Discussion 5 08-01-2006 10:10
pic: Tytus's Nerf Mod Tytus Gerrish Extra Discussion 30 12-08-2005 13:39


All times are GMT -5. The time now is 00:02.

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