|
Page 1 of 1
|
[ 4 posts ] |
|
Limit of timers in RobotC
Author |
Message |
yudopplyr
Rookie
Joined: Sat Oct 12, 2013 2:04 pm Posts: 5
|
 Limit of timers in RobotC
Hi guys, I'm currently using the timers that you can use in robotc time1[T1],time10[T2],etc.
My question here is what happens when the timer reaches it's limit?, I know the limit value that they can take (timer1,time10,,time100) is 32768, but do I need to reset the timer afterwards or can I leave the timer like that untill I need to reset it for another function that ocuppies the same timer, this meaning that the the limit is only of the especific array (time1,time10,time100) and not the timer itself.
|
Sun Oct 27, 2013 1:41 pm |
|
 |
Ernest3.14
Professor
Joined: Sat May 18, 2013 1:24 pm Posts: 271 Location: Olympia, WA
|
 Re: Limit of timers in RobotC
When it goes over 32768, it goes to -32768 and starts again. So as long as you don't read from it, you don't need to reset it. I don't think each array has a different timer; they all share one.
_________________FTC Team 6424, the 'Oly Cow - Chief programmer. FRC Team 4450, Olympia Robotics Federation (ORF). and also quadrotors. Quadrotors!
|
Sun Oct 27, 2013 10:13 pm |
|
 |
mightor
Site Admin
Joined: Wed Mar 05, 2008 8:14 am Posts: 3654 Location: Rotterdam, The Netherlands
|
 Re: Limit of timers in RobotC
If you want additional timers, you may want to take a look at timer-test1.c and timer.h in the NXT sample programs directory. It supports the following operations: It's fairly easy to use and you can have as many as you like. Regards, Xander
_________________| Professional Conduit of Reasonableness| (Title bestowed upon on the 8th day of November, 2013) | My Blog: I'd Rather Be Building Robots| ROBOTC 3rd Party Driver Suite: [ Project Page]
|
Mon Oct 28, 2013 2:04 am |
|
 |
tfriez
Site Admin
Joined: Wed Jan 24, 2007 10:42 am Posts: 620
|
 Re: Limit of timers in RobotC
Only on the VEX PIC is it a 16-bit number. On VEX Cortex it's a 32-bit number, so it goes MUCH higher until you need to reset.
For ROBOTC 4.0 we're actually depreciating the Time10 and Time100 commands.
_________________Timothy Friez ROBOTC Developer - SW Engineer tfriez@robotc.net
|
Thu Oct 31, 2013 4:10 pm |
|
|
|
Page 1 of 1
|
[ 4 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 2 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|