Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting labview chart in vb6

hello all.. i floated this question in the labview forum.. and someone suggested me to post it here.
i have a labview 7.1 vi which acquires data and continously (real time) plots it in a graph/chart. now i have written a visual basic 6 code which calls this labview vi and runs it. now i want to plot the labview chart in the visual basic window. any ideas how can i do it?
thanks.
0 Kudos
Message 1 of 6
(8,466 Views)
This actually can not be done with LabVIEW and Visual Basic alone. The call to the labview vi or dll does not give access to the UI that is displayed in that VI. If you have Measurement Studio for VS 6, then you can use the UI features from Measurement Studio (the chart) to display the results in the VB 6.0 window. You would then get rid of the while loop in LabVIEW and put the LabVIEW call in a loop in your VB program, so that the chart can be updated with a new value.
 
Brandon Vasquez
Applications Engineer
National Instruments

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 2 of 6
(8,440 Views)
Thanks for ur reply Mr. Brandon. Ok now that it I know it isnt possible by vb and labview alone, can u plz tell me whether displaying the whole front panel (instead of the graph) of labview on the vb form is possible or not? If yes, then wud the changes in the front panel be reflected on vb (front panel of LV that is being displayed on vb form)?
 
0 Kudos
Message 3 of 6
(8,430 Views)
Unfortunately there is no way to access a front panel away from the LabVIEW environment. So short of starting up LabVIEW and running this VI as you were doing before, you can not display the UI in a VB form.
 
At this point you have two options:
 
A) LabVIEW should be able to accomplish any task you are programming in VB 6.0. Depending on your version of LabVIEW, you may even be able to create executables. If not, the software to do so is available.
 
B) Measurement Studio is an add-on to Visual Studio that we also offer. This allows access to different UI features that are available in LabVIEW, integrated into Visual Studio. Support for VB 6.0 is available in our Professional and Enterprise versions of Measurement Studio.
 
These options will allow you to accomplish what you are trying to do with the chart and other UI features on your front panel.
 
 
Brandon Vasquez
Applications Engineer
National Instruments

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 4 of 6
(8,423 Views)
thanks again for ur reply Mr. Brandon.
As of now I dont have measurement studio but I would like to know if I purchase the measurement studio for vb 6 will I be able to plot the graph of my existing labview vi on vb form or i need to write the lv program from scratch or would i have to write a newcode in measurement studio.
my existing lv vi acquires data from 3 instruments and plots the data continuously on a graph.
0 Kudos
Message 5 of 6
(8,419 Views)

You would be able to use your current LabVIEW program, but would have to make some changes to it. Instead of the LabVIEW program writing to the chart, you would just have it output the data to plot and then send this data to the chart via VB 6.0.

You would then get rid of the while loop that is in your LabVIEW program (so it is only running through the acquisition once) and add a loop in your VB code to make the LabVIEW program be called continuously and the chart to update as it is being acquired.

Brandon Vasquez
Applications Engineer
National Instruments

Message Edited by Brandon V on 08-21-2006 02:58 PM


Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 6 of 6
(8,420 Views)