03-12-2010 10:03 AM
Hello,
I have a dll, which I want to access under LabVIEW and TestStand too. When I open the .dll, it returns a reference number, let´s say handle or reference. This is a reference to a VI, in which I want to modify the indicators on the front panel, a kind of monitor. This number I have to feed each time to the .dll, when I access it.
So, it is working, if I use the dll only in TS, or only in LV. But if I save the reference number in a global variable in TS, then it doesn´t work anymore in LV. I feed the refnum (numeric) from TS to LV, and I get "Invalid reference" error message.
Has anyone an idea, how should I solve it?
Mitulatbati
03-12-2010 07:43 PM
03-15-2010 07:43 AM
Rolf is right.
A simple approach to resolve the issue might be a Functional Global Variable VI, which handles all DLL calls and stores the handle/reference in a shift register. This VI could then be called by both your LabVIEW application and TestStand.
Best regards,
Sebastian
03-15-2010 08:43 AM
03-15-2010 09:19 AM
Hi Rolf,
as long as you are running the "application" VIs directly in LabVIEW, the execution context is the same as in any VI called from TestStand - therefore, a shared FGV subVI can be called by both "sides".
You are right though that this will not work with a ready-built LabVIEW executable - unless you would try to reconfigure the LabVIEW adaptor to the runtime engine...
Best regards,
Sebastian