Go to Post It's like FIRST saying "Well it was too hard, so we give up. Lets give the kids something easier to do." How is that supposed to inspire kids? - Mike [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 26-01-2003, 12:43
Steven Carmain Steven Carmain is offline
Bit Twiddler
FRC #6013 (Robowolves)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Westland, MI
Posts: 91
Steven Carmain will become famous soon enough
Solution to Timing Loops

I have found out how to time. Based of the information from Innovation First, a loop is every 26.2 ms, assuming your code does't lengthen it. Based off of that, there are 38.167938931297709923664122137405 loops per sec. So to do close timing without overloading the stamp, you do:

Time VAR byte
RealTime VAR byte

Time = Time + delta_t + 1
if Time > 38 then
Time = Time - 38
RealTime = RealTime + 1
EndIf

This way only uses 2 bytes insted of a byte and a word. I tryed the delta_t * 262 / 10 but it overloaded the stamp and was very inaccurate.

Based of of this formula, then the basic stamp will be 0.530431579 seconds fast at end of match.

You can check this information on this xls I inclosed.
__________________
2016+ - Team 6013 Lead Engineer
2002-05 - Team 45 Software/Electrical

A robot is like a campfire: it takes a while to bulid it, and then everyone surounds it!
A world without standards is chaos. A world with standards is chaos.
 


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
Timing of nats for next year Ian W. Championship Event 13 03-03-2003 18:28
Way back there. Size of Nationals, and a solution archiver 2001 23 24-06-2002 03:28
what is or isn't a timing belt? archiver 2001 6 23-06-2002 23:26
two sided timing belt archiver 2001 3 23-06-2002 22:34
Dual Sided Timing Belts Lachuck894 Technical Discussion 9 14-01-2002 10:10


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

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