View Single Post
  #4   Spotlight this post!  
Unread 02-02-2010, 08:32
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: LV Mastery Question ... Main Shifter and Command Global

After working on the structure a little more, I think that I answered my own question ...

(Yes, Tanner, that's exactly what I'm talking about)

I think I've come up with a few rules of thumb to follow:

1) ShiftReg's
  • for Right-to-Left data flow (memory between loops)
  • used to control the logic and flow of the state machine (case structures)
  • A variable that isn't READ from the ShiftReg, to control the logic, probably doesn't belong in the ShiftReg
2) Globals are more Up/Down based, to immediately get data into other VI's
  • Write to the Global within the cases of the state-machine

I'm probably NOT going to put my Drive Command Global into the Main ShiftReg and I'm probably going to remove the Main Shifter from my list of Globals.

In actuality, I'm sure that either method would work, I'm just trying to write efficient code that doesn't waste resources and/or clock cycles.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote