By Ram Prakash
Can anyone please tell what a DVR [ Data value reference ] is ? I want to know at what situation it will be used and what are the advantages we get by using DVR. I am really confused in this topic . If someone has any code in which they have worked with DVRs. kindly share it to me.
DLL functions or shared variables? Or something else?
I have a Labview 2014-64 executable (or I can build a DLL) that runs one piece of equipment, the X-ray. The other engineer has a large CVI Labwindows 2015 + MS Visual Studio 2012 (C++) executable that runs everything else. I want the Labview code to be a slave of the CVI code, accepting commands to turn X-ray On or Off, reporting failures, and the like. Translating the X-ray code into C++ would be possible in principle, but not fun.
Shared variables look easy, but I'm kinda scared of them. I would define all the shared variables in my LV code, since I'm more familiar with LV, then use them in both. There's a thread in here called "Shared Variable Woes" so maybe I should be scared. In the alternative, I tried building a proof-of-concept DLL in Labview, and calling its functions in CVI/C++, and it works, but it's kinda clunky. (I'm attaching it below in case you want to play, or advise.)
Your advice would be appreciated.
More out of curiosity than of hope: has anybody any idea why SVs are almost unsupported on linux? By almost I mean that controls and indicators cannot be bound to shared variables, and that shared variables cannot be programmatically created and looked up. I know that SVs hosted on windows can be accessed in linux LV using datasocket nodes, but that is all it gets. And it has been said that datasocket is despicable. What are the missing pieces that make SV windows-only?
I didn't find much in the canonical places, so I posted a dumb zero-kudos attracting idea.
We have an application where we need to have a custom PCIe board transfer data to the PC using DMA.
We are able to get this to work using NI-VISA Driver Wizard for PXI/PCI board.
The recommended approach is to have VISA allocate memory on the host (PC) and have the PCIe board write to it (as seen below).
While this approach works well, the memory allocated by VISA for this task is quite limited (~ around 1-2MB) and we would like to expand this to tens of MB.
Note: The documentation (and help available on the web) regarding these advanced VISA function (for instance "VISA Move out 32" and "VISA Move In 32") is parse. If someone has some deep knowledge regarding theses, please feel free to share how we could allocate more memory.
Since we are not able to allocate more memory using the VISA function at this time, we investigate doing the same operation using the LabVIEW Memory Manager Functions which allow us to allocate much larger memory block.
Below is the resulting code.
Unfortunately while we can validate that reading and writing to memory using this work well outside the context of DMA transfer, doing a DMA transfer do NOT work (although the board think it did and the computer is not crashing).
We are wondering why this is not working and would welcome any feedback.
Note: the DMA transfer implemented on the board requires contiguous memory for it to be successful. I believe that the LabVIEW Memory Manager Functions do allocate continuous memory, but correct me if I am wrong.
To troubleshoot this, I did allocate memory using the LabVIEW memory manager function and try to read it back using VISA and I got a "wrong offset" error (Note: This test may not be significant)
Another data point; while the documentation for DSNewPtr do not talk about DMA transfer, the one for DSNewAlignedHandle does. Experiment using LV memory manager Handles has not got us anywhere either.
We would welcome any feedback regarding either approach and about the LabVIEW Memory Manager Functions capabilities in that use case.
Thanks in advance.
Note: We are using LabVIEW 2014 if that matter at all.
By Steen Schmidt
I've decided to take the temperature on a known issue, that lvclass files retain knowledge of some of their old content after it's deleted.
For some reason I'm not allowed to upload lvclass files, so I'll describe it instead (using LV2014SP1):
1) Create a new class and save it on disk as class1.lvclass. No member data nor methods, file size on disk is 8 kB.
2) Add one piece of significantly sized (to easier see the issue) member data, I added a 1000x100 array of DBL (with random default data in it). Save the class again, and now class1.lvclass is 4604 kB (why so much, should be around 1000 kB?).
3) Delete all member data again and resave the class. File size on disk is now 1171 kB, I'd have expected 8 kB.
4) I can't ever get rid of that extra data in the lvclass file, not even when I "save as" to create a similar class.
A) What's the reason behind this issue?
B) Is there any way to really delete stuff from a class file, or is the only way to recreate every class from scratch if you want something truly gone?
C) Is there a list (perhaps internal to NI) of which problems this issue causes? Here I'm talking about stuff like this and numerous other threads about class data suddenly not being updated or member data or methods not being called correctly with DD.