LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, Question about using Visual Basic with labview. How do you execute visual basic programs within labview?

Need help on how to execute an external program (written by VB in this case)
within labview.

Thanks in advance,

JJ.
0 Kudos
Message 1 of 4
(2,756 Views)
First of all, the VB code must be built into executable. User the "Communication -> System Exec.vi".

Joe
0 Kudos
Message 2 of 4
(2,756 Views)
There can be two approaches to this question. The first approach is if your vb code is in .exe form. If so you can call this exe simply by using the System Exec function under the communication palette. This function will allow command line commands just like in a command prompt window. You will just pass this information into the function and your exe will start. The second approach is if you vb code is a DLL. If so you can you use the call library function under the advanced palette. This function will allow you to place the function prototype for you DLL and pass parameters in and out of the DLL. See some of the examples that ship with LV. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 3 of 4
(2,756 Views)
Whenever I've used other people's VB DLLs with LabVIEW, I've had to register the DLL using regsvr32 and then use ActiveX to access its properties and methods.
0 Kudos
Message 4 of 4
(2,756 Views)