Go to Post Competing at multiple regionals or Championship events has no bearing on the life lessons you will learn or the unbelievable memories you will have--for that is what FIRST is truly all about. - Alivia [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 16-04-2006, 09:20
JJG13's Avatar
JJG13 JJG13 is offline
Yoda
AKA: Joshua Graffman
None #0180 (SPAM)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Martin County, Florida
Posts: 105
JJG13 has a spectacular aura aboutJJG13 has a spectacular aura aboutJJG13 has a spectacular aura about
Question about relays: update frequency

For the past couple of years the logic in my 26.2 ms loop area has looked like this:

GetData(&rxdata);
set all pwms to neutral and set all relays (fwd and rev) to 0
execute logic that sets pwms and relays
PutData(&txdata);

By setting all pwms and relays to neutral, I know that nothing will move if I don't set it and outputs from the previous pass won't interfere with the current pass. Also, if I need to put relay1 forward, all I have to do is write relay1_fwd = 1 and not worry about relay1_rev because I know it is set to zero at the beginning.

This year I realized that PutData handles the pwms(and a few other things) but not the relays. In fact, I have no idea how or how quickly the master processor sets the relays after it is set in code. This makes me think that my habit of resetting all relays at the start of each loop may not be such a good idea if enough time elapses between the time I set the relays to off at the start and I set the relays to what I want them to be to adversely effect the robot.

I've had no problems doing this so far but, in order to sleep soundly, I need to know how quickly the master processor processes what I set the relays to and if I will ever get burned by zeroing the relays before each pass.
__________________
Behold the power of SPAM.
 


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
team update 13 question matt111 General Forum 5 25-02-2004 22:34
MIM's question of the day on programming. Gene F Programming 3 24-02-2004 16:32
A question about control system options computhief263 Control System 7 04-02-2004 14:46
Official update #1 - 9/13 - Mike Martus Mike Martus OCCRA 0 13-09-2003 21:48
Update 6..last Question archiver 2001 9 24-06-2002 00:25


All times are GMT -5. The time now is 20:03.

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