07-22-2013 07:18 AM
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.
Solved! Go to Solution.
07-23-2013 11:30 AM - edited 07-23-2013 11:39 AM
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
07-23-2013 11:38 PM
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,
07-25-2013 01:10 AM
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
07-25-2013 01:53 AM - edited 07-25-2013 01:57 AM
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 ?
07-25-2013 06:31 AM
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
07-25-2013 11:53 PM
Yeap U r right !
Thank you Marco.
07-26-2013 12:49 AM
Glad to see you solved your issue!
If you want you can provide some beer kudos.
Marco
07-26-2013 04:44 AM