When using a reference to modify an array, you have to read the "Value"
property, an operation which makes a copy of the array the same way as for
reading a local or a global. You can't modify a single array element using
an array reference without reading the whole array. In LabVIEW, references
are references to LabVIEW objects (controls,indicators), not data pointers.
They are mainly intended to manipulate cosmetic/appearence properties of the
object rather than its data. LabVIEW is optimized for dataflow to pass data
from place to place in your diagram. As Craig pointed it out, passing an
array to a subVI is transparently done with a data pointer, provided that
this data does not need to be displayed e.g. its front panel is closed.
LabVI
EW makes data copies for display purposes.
Jean-Pierre Drolet
"Doug (CapeFl)"
a ecrit dans le message news:
50650000000500000008440000-1000509150000@exchange.ni.com...
> General question: To minimize making extra copies of an array (if an
> application/VI needed such), would it be better to receive/send the
> array data via Reference (address/pointer) versus an actual copy of
> the array variable?
> I believe wiring in/out an array as well as using a reference for
> array values is better than making local variable copies.
> Doug