LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No new data reference in inlined VIs

Hi,

 

LV doesn't allow creating a new data reference in an inlined VI.

 

Do you know why?

 

Thanks,

 

Peter

0 Kudos
Message 1 of 4
(2,302 Views)

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

 

 

0 Kudos
Message 2 of 4
(2,251 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,242 Views)

That's right!

 

So the bid is still open 🙂

 

Thanks,

 

Peter

0 Kudos
Message 4 of 4
(2,237 Views)