LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I handle global variables from different DLLs created based on VIs that access those variables

My goal is to break apart an entirely LabView created application so I can still use parts of it (builded as Shared DLLs upon on some VIs) in my new .Net application. My problem is that some others VIs (that I am not intending using) are changing those global variables (in the natural data flow of the application).  I could , of course, send the values of those global variables as parameters, but I don't know how should I pass those data types (and their size)... There are some clusters there...
Any help is well appreciated
0 Kudos
Message 1 of 3
(2,782 Views)
vulpe,
I guess I'm having a hard time understanding your exact question. Do you want to know how to send data to a DLL? What clusters are you talking about? What global variables are the problem? What is the relationship of the global variables to the vis you want to turn into DLLs? Perhaps if you post a picture of what you mean it would be helpful.
 
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,758 Views)


@vulpe wrote:
My goal is to break apart an entirely LabView created application so I can still use parts of it (builded as Shared DLLs upon on some VIs) in my new .Net application. My problem is that some others VIs (that I am not intending using) are changing those global variables (in the natural data flow of the application).  I could , of course, send the values of those global variables as parameters, but I don't know how should I pass those data types (and their size)... There are some clusters there...
Any help is well appreciated


Your problem is of course the use of globals. That is almost always a bad idea and asking for troubles once your application gets bigger. Avoiding race conditions and undesired influences between different parts of your application will take up more and more of your development time as your project grows.

You should look into Functional Globals (LV2 style globals) and shift registers for data storage and queues for passing information between different parts of your applciation. Using these techniques consequently, will require you to spend some more time initially but will allow you to grow your application without increasing the complexity of managing such things exponentially.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 3
(2,747 Views)