07-10-2014 02:44 AM
Hi,
LV doesn't allow creating a new data reference in an inlined VI.
Do you know why?
Thanks,
Peter
07-11-2014 07:19 AM
Hello Peter,
there's a discussion in the forum about the same topic.
Look here:
http://forums.ni.com/t5/LabVIEW/Local-Variables-and-INLINING/m-p/2845800
And there is also the answer why LV doesn't allow creating a new data reference in an inlined VI:
"There can be no instance of the control/indicator, because it's never been placed on the caller's panel.
If it existed, it would have to have properties like POSITION and BOUNDS, and those have never been set.
They COULD NOT be set, since they would have to be set (differently) for each instance of the inlined VI.
The INLINEd VI requires REENTRANCY, that means there is a separate dataspace for each instance.
I suppose that dataspace now would come from the caller.
The point of the INLINE is to connect the caller's output wire to the VI's input wire AS IF the VI's code were copied into the caller.
That means that the CONTROL/INDICATOR is totally unnecessary, and can be removed.
It therefore cannot be accessed. Not by property nodes. Not by local vars.
AND, ON A HUNCH, I tested this: NOT BY REFERENCE.
With a REFERENCE to a control/indicator on an INLINEd VI, I get the same error: this object is not allowed in a VI on which you enabled INLINING.
Because it doesn't exist.
The control/indicator is a metaphor for the interface between the code and the screen display. It ceases to exist when INLINED."
Regards
Elisa
07-11-2014 07:57 AM
Elisa,
I think Peter is refering to the Data Value Reference, which doesn't exactly play by the same rules as a reference to a control/indicator. It is a reference to a place in memory.
07-11-2014 07:59 AM
That's right!
So the bid is still open 🙂
Thanks,
Peter