JPrevost Posted January 9, 2006 Report Share Posted January 9, 2006 Which one is faster with raw data and is there a difference or are they the same thing? I notice the feedback node doesn't release a value at the end of a while loop? Could't you just wire a terminal to the the loop basically creating a shift register? Maybe there is a book that goes into details, if there is, what is it's title and where can I get it Quote Link to comment
Neville D Posted January 10, 2006 Report Share Posted January 10, 2006 Which one is faster with raw data and is there a difference or are they the same thing?I notice the feedback node doesn't release a value at the end of a while loop? Could't you just wire a terminal to the the loop basically creating a shift register? Maybe there is a book that goes into details, if there is, what is it's title and where can I get it They are different implementations of the same thing. The feedback node was introduced later (in LV 7 or so) to clean up the diagram a bit, so you don't have to route wires from one end of the diagram to the other. It is just a matter of taste which you use. I don't think there is any speed advantage. I do remember there being a bug with the feedback node a long time ago, but that was probably fixed. There should be a note in the LV Programming manual explaining the finer points of both. Neville. Quote Link to comment
didierj Posted January 10, 2006 Report Share Posted January 10, 2006 I think both have their advantages. For myself I'm used to the shift register, I seldom use the feedback node. As Neville mentioned, the advantage of feedback node is, that you don't have to route wire through the whole diagram. It's disadvantage might appear, when you need the data after the loop finished. With the feedback node you have to branch your wire and therefore most probably producing (somewhere in the deep background of LV) a copy of your data, and therefore lost of time. Didier Quote Link to comment
Rolf Kalbermatter Posted January 10, 2006 Report Share Posted January 10, 2006 I think both have their advantages. For myself I'm used to the shift register, I seldom use the feedback node.As Neville mentioned, the advantage of feedback node is, that you don't have to route wire through the whole diagram. It's disadvantage might appear, when you need the data after the loop finished. With the feedback node you have to branch your wire and therefore most probably producing (somewhere in the deep background of LV) a copy of your data, and therefore lost of time. At least in LabVIEW 7.x the Feedback node has some dramatic non-optimizations in comparison to shift registers. This is not inherent to the feedback node as it is in fact just a different thing for the same functionality but probably a oversight or time pressure issue, where the optimizations applied to the shift register over the last 4 or so LabVIEW versions haven't been implemented fully yet. For the records there have been LabVIEW versions (5.1 and also 6.01 and others that had some rather obscure and nasty overoptimizations of the shift register resulting in wrong execution of the code.) Considering this I think it is better to introduce a new feature not optimized to the max than having it create wrong code due to a corner case not covered where it does a to agressive optimization. Rolf Kalbermatter Quote Link to comment
JPrevost Posted January 10, 2006 Author Report Share Posted January 10, 2006 How would one go about testing the differences? Could I just run a while loop full speed with some huge data and time how long it takes the i to reach some pre determined limit? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.