ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting a labview chart in visual basic

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 11
(4,752 Views)
hello..
someone plz help me in this. i m really stuck.
thanks.
0 Kudos
Message 2 of 11
(4,740 Views)
You might want to post this question to the Measurement Studio for VB forum or find a VB specific forum somewhere else. I don't know how much help you can get from a bunch of LabVIEW programers. It's been a long time since I've had to program in VB. What about the MS Office Chart control?
0 Kudos
Message 3 of 11
(4,734 Views)

thanks for ur reply. well i thought using mschart control but i am not sure how i can export the labview graph to vb. actually i m not too keen to plot the graph in vb rather just to export the graph from labview and display it.

labview supports vb so i thought may be this shud be possible.

thanks anyway.

0 Kudos
Message 4 of 11
(4,731 Views)
How are you calling the LabVIEW code in VB? Did you make the VI into a DLL or are you using VI Server? What kind of data is wired to the LabVIEW graph? Is it just an array or a waveform data type.
0 Kudos
Message 5 of 11
(4,727 Views)

i have written the following code in vb6 which opens the get data.vi and runs its. this vi acquires data a continuously plots a graph in its frontpanel.

Dim LViewApp As LabVIEW.Application
Dim vi As LabVIEW.VirtualInstrument
Dim vipath As String

Set LViewApp = CreateObject("LabVIEW.Application")
    vipath = "C:\My Documents\LabView Program\get data.vi"
    Set vi = LViewApp.GetVIReference(vipath)
    Call vi.Call

 

0 Kudos
Message 6 of 11
(4,724 Views)
I don't know the syntax in VB but you can use the Get Control Value [Variant] method to get the graph's data.
0 Kudos
Message 7 of 11
(4,715 Views)
well actually i dont want the graphs data.. but the graph itself. it shud be displayed on the vb form.
anyone has any idea how i can do it?
plz help.
thanks.
0 Kudos
Message 8 of 11
(4,693 Views)
What about exporting the graph as a jpeg file? With a control reference, you can use the method Get Image. This returns a cluster with image data that can be written as a jpeg file with Write JPEG File.
0 Kudos
Message 9 of 11
(4,680 Views)
 

Have you looked into using ActiveX? Here is a link to a Knowledge Base article about using a LabVIEW application in Visual Basic using ActiveX : Calling LabVIEW Applications from Visual Basic Using ActiveX

Let us know how these work for you.

-Nathan

0 Kudos
Message 10 of 11
(4,676 Views)