12-18-2014 02:49 PM
@crossrulz wrote:
Do not make a DVR of the control reference. That is making a reference to a reference. Instead, make the DVR of the data itself.
There's no advantage to using a DVR here; wire the array directly. I don't have a recent-enough version of LabVIEW right now to open the VIs that were posted, but passing an array to a subVI through a standard terminal does not necessarily create a copy of that array. To avoid making a copy, the subVI's front panel should be closed (otherwise you will get a copy, for display) and the terminal should be marked as required (otherwise LabVIEW will hold onto a copy, in case you call that subVI again elsewhere without anything connected to that terminal). On the block diagram, the terminal should be on the top-level of the VI, not buried in a loop or case structure. If you follow these guidelines, LabVIEW will work directly on the array passed into the subVI, and will not make a copy.
12-18-2014 03:00 PM
12-18-2014 03:05 PM
@nathand wrote:
If you follow these guidelines, LabVIEW will work directly on the array passed into the subVI, and will not make a copy.
There are complicated gudelines and might not always be suitable.
I guess one possible reason for the use of a subVI here is to present a small part of the data to the user. In this case, the front panel might need to be open. I might also be open during debugging.