View Single Post
  #6   Spotlight this post!  
Unread 14-04-2016, 05:22
The_Waffleing's Avatar
The_Waffleing The_Waffleing is offline
The Horse Shaman
AKA: Mitchel
FRC #0753 (The High Desert Droids)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Bend
Posts: 32
The_Waffleing is an unknown quantity at this point
Re: Robot Drive Not Running Fast Enough - PLEASE HELP!

Quote:
Originally Posted by Bradley Boxer View Post
Our code this year (written in LabVIEW) runs really slow. Extremely slow. I have taken out all the refnums in teleop and in periodic tasks, but this did not seem to help. This would normally not be a problem, but we have several (4) PID loops update in teleop (running on CAN Talon SRX's), and if they are not updated every ~120ms they will tell the motor to stop spinning. Right now, teleop runs every ~100-200ms (measured with "Elapsed Times.vi"). This is a huge problem when we are shooting and need our two wheel motors to spin at exact and fast speeds. Although at this point in the season we aren't adding much code, the problem seems to be getting worse. It also may be worth noting that we are using the LabVIEW 2016 Vision Example to find the goal coordinates, although it is disabled with a global variable when not in use.

Does anyone have any fixes/ideas/suggestions/tips as to how to speed up our code?

Here is the link to Team 303's LabVIEW Robot Code if it helps anyone. Feel free to redistribute if you so please.

https://drive.google.com/file/d/0B9k...ew?usp=sharing

Thanks so much,
Bradley Boxer
Team 303 Programming
So one of things that you can do is remove all the get/set refnums in you're project and bundle them together like you have done but make it a type def. I'm currently busy with other things so I do apologize if I'm not going into very much detail, I'll sit down a write a proper response to your request however I will leave you with a link that another user had passed along to me when I was trying to optimize my code. Hope this helps!

http://frclabviewtutorials.com/teleop/
Reply With Quote