LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Value Reference Read Write - Documentation

Solved!
Go to solution

 

LabVIEW help for Data Value Reference Read / Write Element Border Node says:

 

Fairly new to LabVIEW. The following is from the help for Data Value Reference Read Write:

 

"Note LabVIEW cannot resize the data in an external data value reference. This node produces an error if the array in an external data value reference is a
different size than the array you wire to the right side of the border node. If you wire an array with more elements than are in the reference array to the
border node on the right, LabVIEW truncates the elements to fit in the reference array. If you wire an array with fewer elements to the border node on the right,
LabVIEW adds default data to the reference array until it is filled."

 

I've attached a toy VI that, I would have thought, contradicts this. If true, does anyone have any reason why I shouldn't use this method to grow / shrink a 1D array? If my reading of the help is flawed, can someone explain what it means and where I'm misunderstanding the terminology?  

 

This came up today and I'd like to use this method to dynamically add/delete elements from an array that I access via reference, but want to avoid introducing unexpected behaviour. I^m working on LabVIEW 2019, help 

 

Thanks in advance. 

0 Kudos
Message 1 of 3
(1,083 Views)
Solution
Accepted by topic author DavidCanning

Hi David,

 


@DavidCanning wrote:

can someone explain what it means and where I'm misunderstanding the terminology?  


That's easy: you don't work with external data value references!

 

The help article you cite from provides a link to "external DVR". Following that link you get an explanation what is considered an "external DVR"!

 

Btw. to retrieve the data hidden behind a DVR you should use DeleteDVR. And you should use a DeleteDVR for any NewDVR call to avoid memory leaks…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,077 Views)
Solution
Accepted by topic author DavidCanning

Hi,

 

This restriction is only applicable to an external DVR, i.e. a data value reference created from within a dll.

See more info on external DVRs here: https://forums.ni.com/t5/LabVIEW/Creating-EXTERNAL-data-value-references/td-p/3873039

 

The value of a normal DVR, i.e. a data value reference created in LabVIEW with a "New Data Value Reference", can be resized as desired.

 

Regards,

Raphaël.

0 Kudos
Message 3 of 3
(1,070 Views)