mje Posted August 9, 2011 Report Share Posted August 9, 2011 I've got some weird feedback node behavior, and I'm hoping it's just that I don't understand these blasted things. What does it mean to initialize a feedback node? Seems simple enough to me, wire up a constant, and it's initialized such that the first value returned is what you've initialized it to. Well, not quite: Plop this snippet in a blank VI, and run it. What do you get? I've confirmed these results in LV2010 SP1 and LV2011: Compile/Load value: 2 Compile/Load Incremented: 1 First Run value: 2 First Run Incremented: 1 Each subsequent call to the VI as long as it remains in memory increments both the Compile/Load values by 1. I expect this due to scoping the initialization as Compile/Load. However, there are other things amok: Why is the initial value returned from either feedback node 2 when it has been initialized with 1? Why is the incremented value one less than the original value? Help? Quote Link to comment
crossrulz Posted August 9, 2011 Report Share Posted August 9, 2011 Hit the diagram cleanup and you'll see exactly what your problem is. It would help you if you changed the direction of the fb nodes (right click option). 1 Quote Link to comment
mje Posted August 9, 2011 Author Report Share Posted August 9, 2011 Sigh... Thank you. I...I don't know how I managed to get so many of my input/outputs overlapping like that. Maybe it was because I was right clicking on wires to insert nodes rather than placing them myself? I...urgh. Some days it does not pay to wake up. Quote Link to comment
crelf Posted August 9, 2011 Report Share Posted August 9, 2011 If I didn't know you better, I'd think you were trying to trick us 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.