The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Feedback Nodes & Nested FOR Loops

SercoSteveB
Active Participant

What is Numeric Value Out following execution of the VI?

Feedback Nodes 16_03_2015.png

a) 0

b) 2

c) 4

d) 6

Comments
crossrulz
Knight of NI

C


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
sathishp91
Member

C

nik35324
Member

C

LordNobady
Member

C


Learning LabVIEW since January 2013
A.Bernau
Member

I get C too.
(9 minus 5 => 4)
I was not able to solve this just in my head.
I had to print it out and had to use pens with diffrent coulors to keep track of.
So I am not sure if I could solve this in an environment of a real exam from NI ...
I should try to solve more Daily CLADs from the past 😉

@crossrulz: OK, thank you. I try to remeber your words next time if the question is from similiar type.

Mohammed_Atef
Member

C

crossrulz
Knight of NI

Andreas23 wrote:

I was not able to solve this just in my head.


                   

You need to learn to simplify things then...

The inner loop runs 6 times (2*3=6) and the feedback node is initialized to 3.  So for the top, you get 2*3*1+3 = 9.  Since the bottom loop reinitializes the feedback node each time the outter loop is ran, you get 2*1*1+3 = 5.  9-5=4.


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
sriveni
Member

C

MrStevenUND
Member

C

dellmore
Member

C. The top for loop has it's outer loop initialized to three and it won't re-initialize until the loop is called again else where. Since that doesn't happen the end result should be 9.

The bottom for-loop has it's inner loop initialized to three and every time it's called the inner loop re-initializes. This happens every time the bottom outer loop is calls it so the end result should be 5. Subtracting the two should result in 9-5=4.

-Ricky

hemanth.wnp@gmail.com
Member

Ans: C

mini09
Active Participant

C

SercoSteveB
Active Participant
s.vishal91
Member

steve can u explain the feedback nodes...I don't get it.

crossrulz
Knight of NI

Feedback Nodes work just like shift registers: they pass data from one loop iteration to the next.

The point to notice here is where the shift register is being initialized.

The top diagram has the Feedback Node being initialized on the outer loop.  This would be equivalent to having a shift register on both loops and initializing the outer loop's shift register.

The botton diagram has the Feedback Node being initialized on the inner loop.  This would be equivaltent to having a shift register on just the inner loop.  This also means that the feedback node is re-initialized with each iteration of the outer loop.

Here is what the equivalent would be using shift registers:

Shift Registers.png


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
s.vishal91
Member

crossrulz: Thanx for the prompt and detailed explanation. Could you please explain the couple of questions on initialization of property nodes also.

s.vishal91
Member

sorry feedback nodes

hameedkdnl
Member

@CrossRulz, Thank You For your breif Explanation about FB Node...You are Awesome!!!!..

crossrulz
Knight of NI

hameedkdnl wrote:


                       

@CrossRulz...You are Awesome!!!!..


                   

Wait, are you saying I'm not awesome?  That hurts...


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
hameedkdnl
Member

@Cross Rulz..Just Kidding...

SercoSteveB
Active Participant

        .  That's priceless.  I will need to remember that one.

ashwinilele
Member

C

M.P.Bharghavi
Member

Ans:C

4