Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual basic and LabView

I would like to call LabView from within a Visual Basic Application, I bet this is possible. I am intending to use a GPIB Bus to get data from a calibrator thus i need to use LabView. Is it possible to interface LabView with VB6. If not can i use VB6 itself to interface to the GPIB Bus. Please keep in mind that i am a bit new to VB6, it's only 3 weeks since i began programming in VB.
0 Kudos
Message 1 of 2
(3,236 Views)
Hi,

LabVIEW can act as an ActiveX server, allowing you to control it from any ActiveX client (Like a Visual Basic Application). Refer to LabVIEW's help (Help >> VI, Function & How-To help... (Ctrl + ?)) to look at the properties and methods exported by LabVIEW (Search for ActiveX and then check properties >> application class and VI Class).

This is how you would control LabVIEW, but if all you want is to use GPIB, it is probably easier to call the GPIB functions directly from Visual Basic. For this you have a few options:

- Call the GPIB driver functions directly. You can find examples and the language support files in you hard drive in "\National Instruments\NI-488.2\Languages\Visual Basic".

- Use VISA. If you have LabVIEW install you probably have N
I-VISA installed. You can find examples "C:\VXIpnp\WinNT\NIVISA" and the language interface files at "C:\VXIpnp\WinNT\Include"

- You can get Measurement Studio ActiveX controls. The Main advantage of Visual Basic is how easy it is to use ActiveX controls. Measurement Studio provides ActiveX control for GPIB and VISA (among others). You can find more info at:

http://sine.ni.com/apps/we/nioc.vp?cid=3769〈=US

Hope this helps.

Diego F.
National Instruments.

Note: the file paths may not be exactly the same in your computer.
0 Kudos
Message 2 of 2
(3,236 Views)