Hi tbob!
Thank you for replying to my question.
You Answered;
"None of your shift registers are initialized."
Correct! This is a standard LV programing construct that has been around since LV2 or there abouts. It goes by a number of different names, LV2 global, Functional global, USR (USR),... This consturct behaves like a "static local" (?) in C. This techniques is used any time you want to use the results of the previous call of a VI in subsequent calls of a VI. You can read more about this in the Dr. VI (I believe this is really Greg McKaskle) article that can be found here;
http://www.ni.com/devzone/lvzone/dr_vi_archived1.htm
You went on to say;
"So Labview will use default values on the outputs of math functions. The multiply function defaults to a double for its output."
If you carefully compare the various examples I included in the code I posted, you will see that it does not always use the default output type. Look at the examples that use EXT for example. Also please look at the example that used the "Compound arithmatic" function. That diagram behaves as expected.
YOu went on to say;
"If you initialize the top shift register with a single (value=0), and initialize the next shift register with an array of singles, then all the coercion dots will go away. This is because the data type has been defined from the very beginning."
Again please look at the example I posted. by inserting a "to SGL..." the coercion dots go away without loosing the USR functionality. After having thought about this more, I am leaning toward another answer to this puzzle. Please bear with me while I share my thoughts.
When LV is trying to determine what the data type of the SR should be it starts tracing back the connections to the arithmatic node. The top leg is fed from the same shift register we are trying to define. This leads to a circlular reference and I am guessing that that path is abandoned. It then traces back the other leg looking for a data type. When it finds my "to SGL...", there is only one data type available as an output of that node so it uses a SGL, and all of corecion goes away.
Without the "to SGL..." it traces the wire back to the "index array" which is a polymorphic function so it can not get the data type from there. It then has to chace back the array feeding the "Index array" only to find that it is feed from a shift register that is un-initialized.
At this point I get confused with my current theory. IF the type is larger than a DBL then the coercion goes away. If it is smaller (i.e. SGL U8, U16, etc) it apears to act differently!
"It is good practice to always initialize shift registers."
Provided it is not a USR yes!
Please let me know if you have other thoughts.
Still looking for the answer to my riddle,
Ben