LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW EDVR API for C/C++

Hello
 
I am potentially looking at EDVRs within the context of integrating C++ based code into LabVIEW.

This post has the starting point I needed (thanks rolfk)

https://forums.ni.com/t5/LabVIEW/Creating-EXTERNAL-data-value-references/m-p/3873039
 
And I saw this function in the ni_extcode.h and wondered what its usecase would be?
 
// Unlocks a reference which was previously locked. Only call this when you know the reference is locked.
// Do not do anything with the reference after this returns unless you lock it again.
// There is no API to do a lock from C. You must have acquired the lock from G first.
// Do not call this if you locked the reference using an In Place Element Structure because it will try to unlock it again.
EDVR_UnlockRefWithContext(ExternalDataValueReference reference, ExternalDataValueReferenceContext context);
 
Is there a means of locking a DVR without using the IPPE element structure or the Delete DVR? - the latter locks but destroys the reference as far as LabVIEW is concerned.
 
I am pretty familiar with other C/C++ integration techniques (like I used in this https://gitlab.com/serenial/asynchronous-system-exec) but EDVRs are so tempting it would be great to understand what features NI sort-of but-with-no-guarantee provides.
 
Thanks.
Message 1 of 2
(516 Views)

The only semi official documentation about this is with the LabVIEW GPU Toolkit. In that thread is also a link to the knowledge base article about how to write your own GPU Toolkit extensions and the archive at the end contains not only those semi official headers but also some examples. This is as far as NI ever documented anything about this.

 

Short from getting user ag-huber-luebeck involved in this and share his findings about how he used all this, I think you will be hard pressured to find any other information. I for my part have looked at it and tried to understand some of it but that is as far as I got. The need to transfer large memory buffers from driver level to LabVIEW and vv. with as little performance loss as possible hasn't been any of my serious concerns so far so I did not really look further into that part.

Rolf Kalbermatter
My Blog
Message 2 of 2
(464 Views)