DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

zob

Hi there,
 
I try to start a VI within a llb from a toolkit and it doesn't work...
 
The path to the VI is :
C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Addons\Time Series Analysis\Correlation and Spectral Analysis.llb\TSA Welch (waveform).vi
 
I try this code :
 
' -------------------------------------------
  ' Initialize the LVRuntime
  Dim sgRunTimeVersionT : sgRunTimeVersionT = ""
  LVRuntime.Init sgRunTimeVersionT
  ' -------------------------------------------
  ' Load "Test.VI"
  Dim objVI
  Set objVI = LVRuntime.LoadVI("
C:\Program Files\National Instruments\LabVIEW 8.5\vi.lib\Addons\Time Series Analysis\Correlation and Spectral Analysis.llb\TSA Welch (waveform).vi
")
  ' -------------------------------------------
  ' Call the VI
    Call objVI.Run(true)
    ' -------------------------------------------
  ' Clean up
  Set objVI = Nothing
  LVRuntime.DeInit
 
I had
[LVRT]
libdir = "C:\Program Files\National Instrument\Labview 8.5"
in the Diadem.ini file
 
The error message is attached...
 
Please, could anyone help me !
 
Thank's in advance.
0 Kudos
Message 1 of 3
(3,817 Views)

Hi bull balls,

The error message you included suggests that the top level VI is not finding its subVIs.  When you call a LabVIEW application from DIAdem using the LVRuntime object, you need to call the top level VI of a built source distribution.  The source distribution needs to include all called subVIs-- even those in vi.lib!  You do not need to create a executable, but the source distribution is a required step when there are subVIs, which there almost always are when you count vi.lib VIs as called subVIs.

Also, I would recommend that you initialize the LVRuntime object with an explicit LVRT version, in your case that looks like 8.5, since calling the VI through LVRuntime will only work if the LV version of hte source distribution matches the LV versions with which you initialize the LVRuntime object.

LVRuntime.Init "8.5"

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 3
(3,804 Views)

Hi,

 

You're right, need a source distribution (llb) with VI called as top vi in the llb. It work fine now...

 

Thank's.

0 Kudos
Message 3 of 3
(3,786 Views)