10-17-2005 11:32 PM
10-18-2005 05:59 AM
You can't access LabVIEW globals directly from a caller to the LabVIEW DLL. However there is no problem in providing specific accessor VI functions to that global and export them as additional functions from the DLL.
xin_necc@sina.com wrote:Hi!
I want to build labview application into dll and use vc++ to call it.The labview program is a little complex,for it has many interface to vc++ and has while loop in it.When I use vc++ to call it,I must use vc++ to do other things.That is to say,vc++ creates a new thread to provide for the labview dll to run.the vc main thread goes on to other things.But the vc++ main thread must communicate with the labview dll by setting its inputs' parameters and get the results of running labview dll.Can you advise me how to realize it?
I think global variable of labview could be useful when realizing the communication betweeb vc thread and labview dll.So I want to ask whether the labview global variable could also be built into dll and use it.Could you please tell me how to realize my idea?
Thank you!:)
10-18-2005 08:49 PM
10-19-2005 01:40 AM - edited 10-19-2005 01:40 AM
Message Edited by rolfk on 10-19-2005 01:41 AM
10-19-2005 03:44 AM
05-20-2016 07:20 AM
Hello,
I know that the topic is obsolete but please help me.
I know how to export multiple functions in one Labview dll but it seems that I cannot get the values from one function in the other. To access these variables I created subVIs which just read these values but when calling these functions in my C code the values do not show. I tried to do that for a constant value and it works, but for shared variables it does not work.
Is there something I am forgetting?
I am trying to obtain the values in the main VI through local variables like this:
and the function (subVI) looks like this:
05-20-2016 11:28 AM
There are no shared, local, or global variables anywhere in the images you show. All you have are references to front panel items. Rather than trying to get the data through references, create a VI (a functional global variable) that stores the data in one or more shift registers (you could put a cluster of several items in one shift register, or one shift register per value, whatever works for you) that you call from all the VIs in the DLL to retrieve the data.
05-21-2016 04:26 AM
Thank you for the quick reply!
Think I understand what you propose. I would than have a vi (with two cameras in my case) that will SET the values of the FGV and other vis that will GET the values. These GET vis will serve as functions that I could call in the dll. If I am correct.
Will there be problems regarding the fast aquisition of values? My cameras are about 20 FPS and the values which I set change accordingly.
05-21-2016 08:12 AM