Certification

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD-R Question 39

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.

 

CLD-R Question 39.png

 

 

 

 

0 Kudos
Message 1 of 6
(5,991 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(5,978 Views)

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.

 

Equivalent Code.png

0 Kudos
Message 3 of 6
(5,972 Views)

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?

 

feedback node.png

---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 4 of 6
(5,966 Views)

Pallen, you have to disable the indexing of the input array.

Message 5 of 6
(5,964 Views)

@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?

 

feedback node.png


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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 6
(5,953 Views)