LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making dll from VI containing labview global variable ?

I've made dll from VI containing labview global variable.
But, when I write a c program calling a function from the dll, it returns just error.
The goal is to read a labview global variables from c program. What can i do for it ?

0 Kudos
Message 1 of 3
(2,604 Views)
Hi
 
If you don't use the dll in your LV app, it will be difficult, because it will be in the adress-range of you c app. So any writing of values to the global variable in LV, won't affect the variable in the dll.
What you can do is some kind of client-server architecture. You need a third app, which just does the data exchange - so you should be able to write a value from LV and read it from c.
 
There already have been discussions about similar topics - just search the forum.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 2 of 3
(2,596 Views)

hi there

if you want to read and write a LV - Global from a C-App you could add two functions to your LV-Dll like

WriteGlobal(*Data) and ReadGlobal(*Data).

The access to the global is then done inside the dll-dataspace. see attachment.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 3
(2,585 Views)