LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview shared variables in VBA or Visual Basic

Hi,
is it possible to read/write a labview shared variable from VBA or
Visual Basic?
How does it work?
Where can I find a code example?

Thank you!

Greetings
André

0 Kudos
Message 1 of 3
(2,440 Views)
Yes it can,

i'm not familiar with shared variables, but you can address them via an OPC server (i'm not familiar with those as well) so no code from me...

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,437 Views)

Andre,

You can use simple datasocket protocol to read from and write to shared variables.  The format for the datasocket url is like this...

psp://<ip address of variable host>/<variable library name>/<variable name>

or for example

psp://localhost/TestLib/TestVariable

I've used this before to access shared variables in LabVIEW 7.1 since shared variables are a new feature in LabVIEW 8.0.  So this should work in the same way using visual basic.

I hope this helps,
Justin D.
Applications Engineer
National Instruments

0 Kudos
Message 3 of 3
(2,419 Views)