03-26-2010 12:10 PM
Well I proved my answer, but your VI never stops, you need a way to stop it and see how many loops happen, to do this you need to mod your VI, the mod I added proved my answer.
Alan
03-26-2010 12:19 PM
03-26-2010 12:23 PM
Your answer only focuses on the specific case that the loop stops.
But this is not the "natural environment" of the iteration terminal. The terminal returns its values during each loop execution cycle and this is why I simply do not stop my loop. I do this to brainstorm you guys and make you stop talking about "old" counter values (after an loop stopped).
So try again. Do not change the VI and try to answer the questions.
03-26-2010 12:37 PM
ThHagel wrote:Your answer only focuses on the specific case that the loop stops.
But this is not the "natural environment" of the iteration terminal. The terminal returns its values during each loop execution cycle and this is why I simply do not stop my loop. I do this to brainstorm you guys and make you stop talking about "old" counter values (after an loop stopped).
So try again. Do not change the VI and try to answer the questions.
I agree with your "natural environment" concept and your overall argument but your VI and questions do nothing to persuade me that 'C' is not the answer that NI expects. If they were asking about the behaviour of the terminal while a loop is executing they would have specified that in their question. I'm not defending them, I'm just telling you how I interpret that particular question. Isn't that what your thread is about?
03-26-2010 12:43 PM
Hi Jeff,
here my comments to your post:
there is no direct relation to loop executions and
iteration value
Regards,
Thomas
03-26-2010 01:04 PM
03-26-2010 01:08 PM
I think ThHagel's point is that if you read the iteration count during the first cycle (cycle 0) and use it to index an array for example the loop hasn't executed everything in the loop and so can not actually be "number of times the loop has executed minus 1" as at that point 0 COMPLETE iterations have been executed.
It would make sense to say that it returns the number of times the loop has been started minus 1. However i think that seeings as it can't be any of the other answers we can guess what they meant.
03-26-2010 01:14 PM
It might be better to refer to "i" as an iteration index rather than a counter. Since all LV indexes start at zero, this semantic shift should help minimize confusion.
The attached VI (LV 9) shows the values of i at various places and times. Try running it with Execution Highlighting on. Try hitting Stop immediately after the VI starts running (before the loop starts).
Lynn
03-26-2010 01:19 PM
03-26-2010 01:25 PM - edited 03-26-2010 01:33 PM
I think Thagel's whole argument is centered around the semantics of what "has executed" means. When you read the counter in any particular loop iteration, you are in the middle of the (i + 1)th iteration. and i iterations have completely completed. So the iteration that you are currently in, has it executed? That is what Thagel is debating. Has it started? Yes. Has it finished? No. If something has started but not finished, does that mean it has executed or not?
You can debate that point either way if you want, and depending on what side you lean to means whether you think A or C is the better answer.
Either way, C is the correct answer. And this is one of those problems with multiple choice tests. I remember classmates back in high school picking apart multiple choice questions. The lesson is that if you try to read too much into a question, you are probably going to get it wrong.