LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback Node Initializer Being Ignored ?

Solved!
Go to solution

Hi

 

I have a feedback node sat in a For Loop, the number of iterations is determined by an input array. The same input array is wired to the initializer terminal of the Feedback node.  The Feedback node delay is set to 3 and yet the output of the node only contains the first value of the array for the first 3 iterations. It's easier to show than describe.

 

Screen shot 2012-01-27 at 12.27.39.png

So I would expect the output Array to contain the values 3,1,0,0,1,2 yet it actually contains 3,3,3,0,1,2

 

If I wire the scalar value 99 to the initializer then I get the expected 99,99,99,0,1,2

 

What am I missing ?

 

This is LabVIEW 2011 for MAC OS X

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
Message 1 of 19
(3,166 Views)

Hi Chris,

This is how I see it, the initialise will set the initial contents the first time the feedback node is run, the delay will then output that initial data for however many times it's set to (3 in your example)

I have to admit I haven't had a play with the extras on feedback nodes

Hope this helps, if I've got the wrong end of the stick prod me!

Regards

Steve Watts

SSDC Ltd

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

Message 2 of 19
(3,158 Views)

I'd say that swatts hit the bullseye!

0 Kudos
Message 3 of 19
(3,149 Views)

Hi CRoebuck,

 

   The name Initialize itself signifies that it will be executed only at the first execution. I really wonder how a CLA gets into this simple confusion. Smiley Surprised

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 19
(3,148 Views)
Solution
Accepted by topic author CRoebuck

To expand on Swatts answer a bit more.  You are actually only initializing the feedback node with a single element because you have the array auto-indexing at the loop tunnel.

 

If you fed the entire array into the For Loop and the initializer terminal, it would have worked the way you expected.

 

Message 5 of 19
(3,134 Views)

ha ah , the penny finaly drops. That was the differnce between the original problem code and my poor replication of it. 

 

The auto indexing tunnel, totally failed to spot it. Too busy looking into the feedback node, a feature of which I have little working experience. Thanks to everyone who made +ve contributions towards my enlightenment 😉

 

 

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 6 of 19
(3,114 Views)

It's easy when you focus on the output, Wood from the tree's and all that.

 

 

Don't forget to give Kudo's for a good answer !

LabVIEW Champion
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 7 of 19
(3,109 Views)

What Ravens Fan said is hidden in plain sight in the detailed help for Feedback Nodes.

 

"Note  When you set Delay to two or more executions or iterations, you can wire an array to the initializer terminal to initialize each delay element to an arbitrary value."

 

Lynn

0 Kudos
Message 8 of 19
(3,094 Views)
Actually if you move the initializer one loop out not only does it look better, but this sort of thing won't happen.
Message 9 of 19
(3,075 Views)

@Darin.K wrote:
Actually if you move the initializer one loop out not only does it look better, but this sort of thing won't happen.

moving it out 1 loop disables the "globally initialize" on "first call" options that the OP selected. (Of course that might have been an additional unintended bug that moving the initiallizer would prevent as well):smileysurprised:


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 19
(3,003 Views)