05-10-2006 02:31 AM
http://zone.ni.com/devzone/conceptd.nsf/webmain/1A98AB48E35D913086256E23004E6A22?opendocument&node=5050_US
05-10-2006 11:23 AM
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
05-11-2006 01:05 AM
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
05-11-2006 01:09 AM
| |
05-11-2006 01:50 PM
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