LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLAD sample exam 1

Hi,

 

yesterday I had a discussion with some friends and I want to get some independent opinions now 🙂

 

It concerns this CLAD sample exam question:

test.png

 

 

 

 

 

 

 

 

Now lets see, what does the iteration terminal do? From my point of view: it returns a new value at the beginning of each loop iteration and this value tells me how often the loop has already executed (0 during the 1st iteration, 1 during the 2nd and so on). In this case answer a would be correct, right?

 

According to the results contained in the sample exam, the correct answer is c.

But this is only true (hard to write "true", because I think it's kind of odd to put it that way) if you wait until the loop terminates and than check what value was returned last.

 

I'm curious about any comments or opinions.

 

Regards,

Thomas

 

 

 

Message 1 of 55
(4,182 Views)

Hi there,

 

c is correct because if it runs 1 iteration... the iteration terminal would have returned 0.... IE. iterations minus 1

 

Jevon

0 Kudos
Message 2 of 55
(4,171 Views)

I see your point though... you are taking it as how many iteration have already executed fully when you read the iteration terminal at the beginning of a loop...

once a loop has started, labview is counting that as an executed loop... so IE.... the iteration count is the amount of loops executed... including the present loop.

 

 

Jevon

Message Edited by JChec on 03-26-2010 11:39 AM
Message 3 of 55
(4,168 Views)

Also typically you use the Iteration counter inside the loop.  So on your first Iteration your count would be 0, i.e n-1.  This ties in with arrays starting at 0 to keep apples with apples so to speak

 

Craig 🙂

LabVIEW 2012
Message 4 of 55
(4,167 Views)
Run attached example and convince yourself. c is definitely the correct answer.
0 Kudos
Message 5 of 55
(4,157 Views)

I would check c too (maybe if even have it, can't remember) , more because I expect it as the expected right answer 😮

In examines you should always say what your examiner wants to hear, right? Well, most of the time easy to proof in an engineering world 😉

And that's why the best preperation to a test is a test test, to learn how you have to understand the questions and what are the expected answers, otherwise it would be too simple 😄 😄

 

If you are picky answer a  might also be correct because the sentence is written in the past * and the terminal will spite out it's value right at the beginning of the loop when the loop has not (completely) executed.   That's why it is positioned inside on the left side.

 

*) I'm not a native English speaker, and grammar in any language hasn't been my favor anyway, so I might be false.

 

Message Edited by Henrik Volkers on 03-26-2010 11:48 AM
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 6 of 55
(4,124 Views)

Hi JB,

 

your VI only focuses on the last value the iteration terminal returned. This is not precise enough, I think.

 

Let's see if I can ad some useful things (it's all about precise interpretation):

 

- they are using the term "the number of times the loop has executed"

 

imagine some code inside the loop, a sub-VI let's say that takes some time to execute.

Now, if someone would ask you to provide an indicator that shows how often your sub-VI has been executed, which is equal to how often your loop has been executed, what would you do? I would simply wire an indicator to the iteration terminal. 

 

Maybe I have an understanding problem with "has been executed". For me this means any code inside the loop has been processed and than a would be correct.

 

Did I get the question wrong? A german version of that sample exam is also availble, but that leads me to the same opinion.

 

 

 

0 Kudos
Message 7 of 55
(4,116 Views)
I don't see how this can be argued. You said yourself that with the first iteration, the value is 0. How can that mean something other than n-1? Simply wire a 1 to the N terminal of a for loop. You will never, ever get a value of 1 from the iteration terminal.
0 Kudos
Message 8 of 55
(4,098 Views)

JB said: "Run attached example and convince yourself. c is definitely the correct answer."

 

It is not. In the meaning: not always.

A can be the correct answer too. See attachment.

 

I would descrebe the iterator: the number of times the loop has started, minus 1.

 

I took the CLAD exam once. Dit not pass only because of NI's unability to ask questions. NEVER AGAIN.

 

.

 

 

  
0 Kudos
Message 9 of 55
(4,088 Views)

Hi ST5,

can you explain? I did not see what you mean.

 

Mike

0 Kudos
Message 10 of 55
(4,080 Views)