Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Storing Data and Reducing Data Copies with Data Value References

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Because LabVIEW copies data frequently, applications with large data sets might experience slower performance and out of memory errors. You can help manage memory and avoid frequent data copies by using data value references to store large data sets.

The following block diagram shows how to access and operate on the data stored at the location the data value reference points to.


Use the New Data Value Reference function to accept and store any type of data and return a reference to that data. Because the reference points to the stored data, you can access the reference inside In Place Element structures, and LabVIEW does not make copies of the data.


Use an In Place Element structure and the Data Value Reference Read / Write Element border node. You can wire a data value reference to the border node, operate on the data within the In Place Element structure, and replace that data in the original memory space.


Use the Delete Data Value Reference function to remove LabVIEW access to the data stored in the reference. This function deletes the reference but leaves the stored data intact.

Storing and Reducing Copies of External Data

External data value references are similar to data value references except they work directly with data owned by components external to LabVIEW, like the direct memory access (DMA) buffer of a device driver that controls a data-streaming device. You can work with this external data without incurring a copy to bring the data into LabVIEW. If a device driver supports an external data value reference, you can interact with the external data similarly to the way you interact with data value references. You also can use the Advanced TDMS VIs and functions to interact with external data value references.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit