The Daily CLAD

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

Re: CLAD2017 - Fundamentals - Nested FORs

Active Participant

Consider the VI. What are the values of Numeric Value 1 and Numeric Value 2 required to generate the contents of Numeric Array Out shown below?

 

 Nested FORs.png

 

 

Nested FORs Answers.png

 

Nested FORs Answers 2.png

Combined.png

Comments
Member

C

Member

Ans C

Happy to Wire
Member

C

Member

C

CLD

Member

c)

Trusted Enthusiast

Terminal for Numeric Value 2 should be outside the outermost loop, otherwise the output could be neither of the proposed answers......

Member

C

Knight of NI

C


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Trusted Enthusiast

Answer C

Regards
Ray Farmer
Member

c

Thanks & Regards,
Bharath Kumar
Active Participant

Hi Intaris

 

Cryptic....could you expand?

 

Steve

Combined.png

Trusted Enthusiast

If the value of the control "Numeric Value 2" changes between the first and subsequent iterations of the outer loop, any new value of the control can be inferred.  If, after Iteration zero of the outer loop the value of the control would change to 5, the output would be (with a value of "Numeric Value 1" of 3): 0,1,0,1,2,3,4,0,1,2,3,4

 

Due to the fact the control is read multiple times, race conditions are possible assuming it's not run as a sub-VI.  Nit-picking.

Member

c      3,2

Active Participant

Num1=3 | Num2=2

 

since only the inner loop appends to the array (in the shift register),

Num2 must be 2 (so 'i' can be 0 and 1).

since we have 3 times of 0,1 in the output array, the outer loop must execute 3 times,

thus Num1 must be 3.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
Member

obviously not A and not D.
The Array is written by the inner Loop so we get the pattern 0, 1, 0, 1, 0, 1 if we have Nummeric value 2 = 2

So answer C

Member

Ans C

Member

Answer is:C C.JPG

Muralidharan Dasarathan
Member

 

Answer C...

Smiley Very Happy

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

My answer is C

The 0 and 1 values are responsible by the inner loop (Numeric Value 2) while the repetition of  0 and 1 value is responsible by outer loop (Numeric Value 1).

To obtain 0 and 1 value, 2 iterations are required. Therefore, Numeric Value 2 should be 2.

Meanwhile, to obtain 3 repetitions of 0 and 1 values, 3 iterations are required on the outer loop (Numeric Value 1)

 

Therefore,

Numeric value 1 = 2

Numeric value 2 = 3

Member

The answer is C😇