The Daily CLAD

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

Re: CLAD2017 - Fundamentals - Parallel Loops and the Dataflow Paradigm Series: 1 of 5

SercoSteveB
Active Participant

What is the value of Numeric Value Out following execution of the VI?

 

StateMachineDataflow.png

 

a) 5

b) 6

c) 7

d) Undefined (the VI does not stop)

 

Comments
Priya16
Member

Surely it should execute 4 times bcoz of lower loop has conditional string stop (N=3) & stop. And the upper loop executes 2 times(N=2). So array size 6.

crossrulz
Knight of NI

D

 

There is a data dependency between the bottom loop and the sending of the stop command.


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
Vishnu.R
Member

D

A.Bernau
Member

while loop never ends (it will never receive the STOP), so answer D

Priya16
Member

Apologize i will get returned back my ans as b. I ran a snippet that was having enqueue function before merge error so that I got b. Array size six. Now I run a snippet as mentioned above question but I got array size four. Though the option is not there, I would say D. But really not clear how could we say the vi does not stop (D). How to approach this type of loop synchronism. 

nik35324
Member

D

Baltur
Member

D, the VI does not stop because the While Loop doesn't stop because it never receives the 'STOP' order.

The While loop receives 5 elements from the two For loops. But it will not stop without receiving a 'STOP'. And the 'STOP' cannont be enqueued before the While loop ends ends because of data dependency (the Merge Errors before the Enqueue waits for the error data from the While loop)

crossrulz
Knight of NI

What we have here is a form of "deadlock" (just to throw out the CS term).  Some might call it a "catch 22".  A is waiting for B to tell it to stop but B is waiting for A to stop in order to run.  All because of an error wire...


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

d

Matt-A.
Member

D. 

 

Hmmm.  An Error wire is a sure way to assure execution order, but it also causes issue like this. 

 

One of the for loops needs to NQ the STOP payload.  Conversely, a watchdog or control could be OR'd with the stop terminal. 

Tsjabrantes
Member

D...

It doesn't receive "Stop" condition into while loop.

Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
AUlikyan_ANEL
Member

D

HARDIK22
Member

at input side of marge error..only enqueue error will reach..

PhilB58
Active Participant

D
The final Endqueue Element (with "STOP" message) will be executed after the end of the While Loop, but this While Loop is waiting for the "STOP" message to end,  the vi will run infinitely.

SOM19
Member

D

levonsg
Member

D

https://images.youracclaim.com/size/340x340/images/2edb5b1a-9414-44e1-8519-c774fc6dd079/36015_Certificate_Badges_FINAL__1__NI_Instructor_v5.png
istan0227
Member

D