DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

call labview vi interactively from diadem 10

Hi, I am trying to run a LabVIEW VI from DIAdem.  I have LabVIEW 7.1 loaded on my machine and got Diadem 10. I have downloaded the tool for calling LabVIEW VIs interactively from DIAdem but am unable to run my VI. Only VIs from library DIAdem_selectVIs executes. Is there any solution to call LabVIEW VI from DIAdem 10.
 
This is the link. Plz Check it out.

http://zone.ni.com/devzone/conceptd.nsf/webmain/1A98AB48E35D913086256E23004E6A22?opendocument&node=5050_US

 
Regards,
Peter.

Pizza
0 Kudos
Message 1 of 5
(3,255 Views)

Hi pizza,

Yes, I've heard that that example no longer works in DIAdem 10, but I haven't taken a look at it yet to see why.  However, the general topic of calling LabVIEW VIs from DIAdem is actually much simpler than that.  Check out the example code below, and let me know if you have any questions how to use it.  The file "Binary File Analyzer.vi" is the VI that is being called, and it has one input terminal ("file path") and one output terminal ("file path out").

OPTION EXPLICIT
Dim lvapp, vi, viPath, paramName(1), paramVal(1)
Set lvapp = CreateObject("LabVIEW.Application")
viPath = AutoActPath & "Binary File Analyzer.vi"
Set vi = lvapp.GetVIReference(viPath)
vi.FPWinOpen = True
paramName(0) = "file path"
paramVal(0)  = "C:\DIAdem Hands-On\ReadMe.txt"
paramName(1)  = "file path out"
Call WndShow("SHELL", "MINIMIZE")
Call vi.Call(paramName, paramVal)
Call lvapp.Quit()
Call WndShow("SHELL", "MAXIMIZE")

MsgBox paramVal(1)

Cheers,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 2 of 5
(3,236 Views)
Hi Brad,
 
     Thanks for your quick response. I worked on that example You have sent. It's working fine. I find little hard to pass my channels from Diadem to Labview and vice-versa. Can You please help me. I have attached a simple array addition Labview VI.
 
Cheers,
Peter
Pizza
0 Kudos
Message 3 of 5
(3,228 Views)
Hi Brad,
 
     Thanks for your quick response. I worked on that example You have sent. It's working fine. I find little hard to pass my channels from Diadem to Labview and vice-versa. Can You please help me. I have attached a simple array addition Labview VI.
 
Cheers,
Peter
Pizza
0 Kudos
Message 4 of 5
(3,223 Views)

Hi pizza,

I recommend saving the channel or channels to a TDM file and passing the file path to LV.  The commands DataFileSave() and DataFileSaveSel() will enable you to save all or some of the channel in the Data Portal to a new TDM file.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

 

0 Kudos
Message 5 of 5
(3,210 Views)