View Single Post
  #9   Spotlight this post!  
Unread 24-11-2010, 20:12
iblis432 iblis432 is offline
Co Captain/Chief Programmer
AKA: Bobby
FRC #2106 (Junkyard Dogs)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Virginia
Posts: 146
iblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to beholdiblis432 is a splendid one to behold
Re: [FTC]: Lag and Teleop (Labview)

The robot locks up with your edits, I have a few ideas why: you placed a while loop in my subvi, since this vi was in another while loop, it could be causing the lockup. You also had all the state numbers minus 1. so you had state 1 always going to 1, 2 always going to 2, so they never moved forward. Otherwise, I completely understand all of your comments. The switcher was not something I had thought about, but is certainly something I'll remember. As for the shift registers, in FRC I always use them, but they are a bit of a pain in FTC because the only structure that supports them is while loops, and those cause the robot to lock up if you place them inside of each other. In FRC I just use a for loop where n = 1. it's true i could have the state and timer values go in and out of the subvis as controls and indicators, and use the entire teleop while loop for the registers, but by that point it's more ugly than it's worth, considering it gives a milisecond reduction in lag. Plus although we did have those counters in there, they didn't seem to freeze anything up when we tested running the arm and the drivetrain at the same time. And finally, I had my suspicions about the usefulness of the hz limiter, and you finally confirmed it.

While I'm reverting back to my version of most of the code, I still must thank you, I learned a lot from your edits that can be used in FRC.
__________________
"Don't worry, programming can fix it"
Reply With Quote