Assuming all of the Data Point Array In and Data Point Array Out terminals are of the same type defined (typedef) type.
Which of the following Block Diagrams is indicating the correct propagation of typedef information through the FOR Loop?
NOTE: Some Block Diagrams may have been modified through the power of GIMP .
Sine the array is the type def, the autoindexing will eliminate the type def propagation. So B shows the coercion dot in the right location.
As far as I understand, we have three kinds of tunnels here: * Shift Registers * Auto Index Tunnel * Standard Tunnel
Not answer a) The second line inside the loop is an auto index tunnel. The data type inside the loop should have an array dimension := dimension – 1 (compared with data type outside the loop before) So answer a has a wrong data type inside the For Loop.
=> in answer b, c, d it seems correct (for second line).
Not c) and not d) Line 3 is a standard tunnel. The data type should not change by transition outside to inside the loop. It remains b) for the correct answer.
@ Crossrulz I can guess the coercion dots after you mention it. I would not be able to recognize them without your help (to mention it). Similar color and to small. In my opinion in answer b) there shouldn’t be a coercion dot, because we have the same data type as before… (But obviously I am wrong).
A.Bernau wrote: In my opinion in answer b) there shouldn’t be a coercion dot, because we have the same data type as before… (But obviously I am wrong).
But they are not the same type. The indicator is defined by a type def. The output of the tunnel is just a cluster. Yes, they happen to have the same underlying data. But they are defined in completely different routes and therefore we cannot guarantee they stay the same.
My personal opinion is that arrays should not be type defined. The clusters they contain should be the type def. That would eliminate some of this confusion and it makes it easier when you have to work on a single element of the array.
OK, I should read and translate the headline before I try to solve the DCLAD ;-) And yes, your reasons sound comprehensible, so you convinced me. Thank you very much for your detailed Explanation!
Following the explanations above and after I had checked the exercise through labview, I agreed with the comments from @Crossrulz, which sum up the behavior of the VI.
(B) is the correct option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.