View Single Post
  #11   Spotlight this post!  
Unread 12-02-2015, 12:37
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 123
aeastet is an unknown quantity at this point
Re: Best Practice for adding custom VI to Robot Main?

As long as you understand order of operations and what the code is doing, how it will affect everything else and data flow. You can put it where you want. The robot main was constructed to make things easy for people that have never programmed before. Put this in this vi and this in this vi etc... It give a step by step to try and help you do the right things without having to understand everything about how to program.

If you are confident that you know what you are doing and how things work then making subvi's that run in parallel with the main loop is Okay. You will have to be careful that you are not talking to a motor drive, solenoid, relay, etc.. in multiple loops.

My programming team has loops for different functions of our robot. When that function is required we call it from the other loops when you need them to work together. Like drive and lift. The drive is in the teleop loop but the lift is in its own loop so we can automate the steps of lifting a tote or putting it down.
Reply With Quote