View Single Post
  #6   Spotlight this post!  
Unread 07-02-2009, 00:01
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: Can't read encoders

Regarding the use of the shift registers:

I believe you are correct in that the Get.vi does not modify the device reference, so the shift registers are not strictly necessary in this case, but shift registers are good form for this sort of thing.

If you were writing this code and someone later decided to update the Get.vi such that the device reference was changed (admittedly unlikely), then the shift registers would cover that eventuality; whereas if you had wired straight through tunnels, then you would lose the changes on the next loop iteration.

One other consideration is that LabVIEW may have to make a copy of the data (internally) when you wire through a loop tunnel. So the tunnel may require more memory to execute than the shift register, but I would be rather surprised if this caused a problem in anyone's code in FRC. This would be more of consideration if you were passing extremely large quantities of data through the wire (e.g. large array or cluster of arrays).

Last edited by airnate : 07-02-2009 at 00:07.
Reply With Quote