|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
RC Refresh Rate
Does anyone happen to know how often the RC will scan the code?
I'm trying to estimate how long something will go by saying increment the counter every loop but i don't know how often it refreshes so therefore i don't know how many increments i want it to count to.... Thanks in advnace |
|
#2
|
|||
|
|||
|
Re: RC Refresh Rate
The 2007 & 08 RC's execute the user code around 28-32 times per second, depending on the amount of time the code takes to execute.
|
|
#3
|
||||
|
||||
|
Re: RC Refresh Rate
Code:
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{ /* I'm slow! I only execute every 26.2ms because */
/* that's how fast the Master uP gives me data. */
Process_Data_From_Master_uP(); /* You edit this in user_routines.c */
if (autonomous_mode) /* DO NOT CHANGE! */
{
User_Autonomous_Code(); /* You edit this in user_routines_fast.c */
}
}
It doesn't vary much to matter, if you have code that makes it take longer than 26.2ms to run it, it will explode. |
|
#4
|
||||
|
||||
|
Re: RC Refresh Rate
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: RC Refresh Rate
Can we figure out the loop time for the 2009 controller or do we have to wait for the default code?
|
|
#6
|
|||||
|
|||||
|
Re: RC Refresh Rate
Based on the information I've been able to scrape together about the new control system, I'm not sure "loop time" is going to be a valid concept. It looks like it'll be more like the way EasyC works: if you want to keep track of time, or do something every so often, you'll have to use real timers.
|
|
#7
|
|||||
|
|||||
|
Re: RC Refresh Rate
Quote:
Also, the new controller could still be running tasks in fixed time loops. At least, it's easily possible to do so on a Labview RT controller, though there are certainly other control methods they could be using. But for measuring elapsed time, it'd certainly be easier to start a timer and watch the elapsed time value instead of trying to count loops. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gyro Rate | Gary Bonner | Programming | 12 | 22-03-2008 16:49 |
| Compression Rate | pyr0b0y | 3D Animation and Competition | 2 | 15-02-2008 21:43 |
| Help!! Refresh my memory!! | Mike Rush | General Forum | 1 | 14-01-2003 22:43 |
| refresh my memory | archiver | 2000 | 2 | 23-06-2002 22:40 |
| Does this forum refresh? | Erin | General Forum | 1 | 01-06-2001 12:19 |