|
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.
|