LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

feedback node behavior

 I never expected a difference between Array1 and Array2 in the attached vi.

 

In the feed back version, if the incoming array is all false, Feedback indicator is not initialized to empty, and Array2 contains stale data.

 

feedback.png

0 Kudos
Message 1 of 7
(2,634 Views)

You never clear "Feedback" before starting.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(2,630 Views)

Can you explain what you are asking about in a bit more detail?

 

Show what you are getting and what you expect the results to be.

 

The VI you attached is missing a tunnel assignment, and doesn't match the VI image you have posted.

0 Kudos
Message 3 of 7
(2,629 Views)

Dang it,  sorry about the attached.  I was trying to be nice by back versioning the source code, but I went beyond the feedback node feature.

 

I don't really have a question,  I just expected the initializer to intialize Feedback (and Array2) to empty, regardless of if the true case ever executed.

 

My bad, and a heads up to others.

 

 

0 Kudos
Message 4 of 7
(2,624 Views)

@beavercreek wrote:

Dang it,  sorry about the attached.  I was trying to be nice by back versioning the source code, but I went beyond the feedback node feature.

 

I don't really have a question,  I just expected the initializer to intialize Feedback (and Array2) to empty, regardless of if the true case ever executed.

 

My bad, and a heads up to others.

 


 

I don't know why you'd expect an initializer to initialize something back to empty after code has executed.  The initializer only operates on the feedback terminal when it executes.  Once you get into your For Loop, the initializer terminal never comes into play again.

 

One problem with your code is that your terminal is at the output of the feedback node rather than the output of the build array.  So the data going into the feedback array indicator is always from the last iteration where the boolean was true, not the current iteration.

 

If you want to get the data in the array indicator after the for loop is done, then I would use the variation with the shift register, and not use the feedback node.  Or if you use the feedback node, use the initializer terminal on it, then it isn't necessary to have the case structure and you can wire the data directly out to an indicator outside the for loop.

 

 

 

0 Kudos
Message 5 of 7
(2,617 Views)

>One problem with your code is that your terminal is at the output of the feedback node rather than the output of the build array.

Oops, see first post png, was playing around trying to get the behavior I expected.

 

How did you get that question mark thing on your feedback indicator and what is it?  (you have the boolean wired to it)

0 Kudos
Message 6 of 7
(2,614 Views)

Right click on the feedback node and pick "Show Enable Terminal."

0 Kudos
Message 7 of 7
(2,604 Views)