LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data transfer between LabView and VB.net

Solved!
Go to solution

Hello,

 

I want to have two applications running, one labview and another vb.net. The LV application consists of two controls a,b & one indicator c.

 

The logic is a+b=c which is a WHILE loop. From VB.NET I want to pass values of a, b to LV and get back the result 'c' may be through event structure in VB.NET.

 

Please let me know how to achieve this.

0 Kudos
Message 1 of 9
(4,851 Views)

Hi!

Here you can find a starting point for .NET event handling in Labview:

https://decibel.ni.com/content/docs/DOC-9161

 

You could,as an alternative, use Labview to build a DLL and call it from VB.NET or vice-versa.

As a third alternative the programs can communicate via TCP/IP or UDP or through a web service.

 

Regards,

Marco

Message 2 of 9
(4,820 Views)

Hi,

 

I am looking for solution using activex server  in LV. Actually I am able to create LV activex server and register it with vb.net.

 

In fact I am also able to start the VI and see that the while loop is running. But unable to pass values to the control a and b.

 

Can somebody explain me using activex server properties & methods how to pass the values to controls.

 

Rgds,

 

 

0 Kudos
Message 3 of 9
(4,804 Views)

There should be an example for you, as noted in the last paragraph of this link: http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/activating_lv_activex_srv/

 

Marco

 

Message 4 of 9
(4,785 Views)

Marco, ur support is appreciated !

 

However the example is for visual basic 6. Also I know how to call dll, exe from vb.

 

What I am trying to do is use the methods & properties ( OOPS ) of Virtual Instrument / LV application to transfer data.

 

The attached screenshot will help you understand my problem better. Here I am trying to stop the execution of counter increment logic in LV from vb.net

 

Can you suggest solution ?

2.png

0 Kudos
Message 5 of 9
(4,781 Views)

Hi!

In sub Button1_Click you are defining and initializing local va1 and vi1.

That's probably why the Button2_click is not working as you want.

 

Always use the global va1 and vi1 and everything should be fine.

 

Regards,

Marco

 

Message 6 of 9
(4,768 Views)
Solution
Accepted by topic author puneguy

Yeap U r right !

 

Thank you Marco.

0 Kudos
Message 7 of 9
(4,755 Views)

Glad to see you solved your issue!

If you want you can provide some beer kudos.

 

Marco

Message 8 of 9
(4,751 Views)
My pleasure !
0 Kudos
Message 9 of 9
(4,736 Views)