![]() |
Difference between Shift Register and Feedback Node
This is a general question about LV programming, but would love to hear some opinions on this...What is the difference between using Shift Registers and Feedback Nodes? They appear to be functionally the same, just drawn differently in the Do Loop. Is there performance differences between the two?
I did some poking around NI website with this question and found some great debates about their use, but most of the discussion were referencing a few rev's back of LV. Is there a definitive answer on when to use one over the other for the latest revisions of LV? |
Re: Difference between Shift Register and Feedback Node
They are pretty much the same. I used them at different times more from a personal preference. I use shift reg more just because I have been programming with LabVIEW from the early 90's and grew up with shift reg.
I use shift reg 3/4 of the time. I use feedback nodes to save space on the block diagram and to keep from running wire all cross my block diagram. I most only use the feed back nodes pointing to the right. I do not like to have any wires going from right to left. So in those cases I use shift reg. These are all personal preferences and not the same for everyone. I have never seen any real speed differences that really matters. The feedback mode dose have some built in functions that to do the same with shift reg you would have to add a little code. But anything you can do with a feed node you can do with a shift reg and a little extra code. There are some extra initialization setting (configuring) that the shift reg does not have, but I never had a need for them. Which one you use is up to YOU. |
Re: Difference between Shift Register and Feedback Node
i hope you aren't using shift registers under teleop:yikes:
|
Re: Difference between Shift Register and Feedback Node
Quote:
|
Re: Difference between Shift Register and Feedback Node
Quote:
The number one way I use shift reg is in single loop while loop just to store a value for later use. |
Re: Difference between Shift Register and Feedback Node
Simply, shift registers are just a way to pass a value from one iteration of a loop to the next iteration of the loop. They require a "host loop" that they connect within.
Loop iterations (0 is the initial value passed into the shift register) 0 1 2 3 4 5 6 7 Output (This looks weird, but due to the design of the shift register, the output comes before the input, left to right) 0 0 0 1 2 2 3 0 Input 0 1 2 2 3 0 7 Final output 7 A feedback node is basically a shift register without the loop. The shift register takes and delays the incoming signal one iteration of the vi. This would be used in Teleop, where you can't have loops. VI iterations 0 1 2 3 4 5 6 7 Input 0 0 1 2 2 3 0 Output 0 0 0 1 2 2 3 0 |
Re: Difference between Shift Register and Feedback Node
Quote:
|
Re: Difference between Shift Register and Feedback Node
1 Attachment(s)
Our team uses while loops with shift registers to run all of our inputs and outputs. Inside each loop is a case structure with an enum for 3 modes, which are init, run and end. All the code that would normally be placed in the begin VI is placed in the init case, and then that case is run in begin. In run is all of our code that is used at runtime. In end it the code that is normally located in finish. This shift registers are used to transfer the references between the 3 states. This means that we do not need to use refnums which saves some resources.
|
Re: Difference between Shift Register and Feedback Node
Quote:
|
Re: Difference between Shift Register and Feedback Node
Quote:
|
| All times are GMT -5. The time now is 11:44. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi