10-08-2013 01:55 PM
I have never used the feedback node in this manner. Can someone please explain to me how it works when you set the initialize terminal to an array? (By the way, I did read the LabVIEW help documentation, but I still don't understand what happens when you wire an array to the initialize terminal.) The answer is C.
10-09-2013 07:35 AM
You should notice something important with that Feedback Node. See the 3 in the middle of it? That means the value coming out is from 3 calls ago. It keeps a history of 3 items. So what the array is doing is initializing this history buffer. Since the feedback node is set to a delay of 3, only the first three elements of the array are put in the history.
10-09-2013 08:22 AM
Sorry, I wasn't clear about my question. I understand how the feedback node worked, but the part that confused me was the feedback node being initialized with an array. However, I did figure out what the equivalent code is and what the feedback node was doing with the array. The shift registers were initialized with the first three elements of the array. See below.
10-09-2013 08:41 AM
I had not seen a Feedback Node configured this way, so this post intrigued me.
I re-created the code as I see it here. But my array output is not listed in the answers. I get 2,2,2,0,1
Something must be wrong with my code. But I don’t see it.
Anyone?
10-09-2013 08:42 AM
Pallen, you have to disable the indexing of the input array.
10-09-2013 11:32 AM
@pallen wrote:
I had not seen a Feedback Node configured this way, so this post intrigued me.
I re-created the code as I see it here. But my array output is not listed in the answers. I get 2,2,2,0,1
Something must be wrong with my code. But I don’t see it.
Anyone?
As already stated, you have to disable the auto indexing tunnel. What you have is a scaler going into the initalizer. What happens if you don't supply enough elements to fill the history buffer is that the rest is filled with the last supplied value. So in your case, you have three 2s going into the buffer.