LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Missing SubVis Error 1003 when VI Called Via VI Server

Solved!
Go to solution

I have a Labview application that utlilises DAQmx functionality to acquire data and uses analysis vi's contained in Labview vi.lib folders.  The application is compiled into a llb with a top level template vi. I have successfully used the VI Server technique to launch and control the top level vi using Labview 7 and 7.1.  This technique allows me to open, run, and access front panel controls at runtime.  We have in fact compiled the VI server functionality (implemented in separate vi's) into a DLL and used applications such as VB6 to launch the VI, control it and abort it.This techique has worked really well over a number of years for us.

 

We have now upgraded our application to Labview 2009 and implemented NI Scope to acquire the data from a PXI-5922 digitizer.  We are using the same analysis functions as the previous version.  I can run this as a standalone VI, and I can also write another "launcher" VI that uses VI's from my VI server solution to launch the application (open, run and control it).  The problem comes when I try to launch the application outside of the Labview Development environment. Using VB6, I can open the VI, but when I use VI server to run it I get error code 1003 (VI not executable). The vi appears with a broken arrow.  Clicking the broken arrow gives me an error "Missing subVi". 

 

To eliminate "my" application from the problem I copied one of the NI simulated templates (GenerateDisplay.vit), moved it to a test directory and renamed it.  I can launch and run this vi from the Labview development environment, as well as using my VI server "launcher" mentioned above when running in the Labview Development System.  However, I get the missing VI error again when my new test VI is launched using another application.  I have compiled my launcher application into an executable (using the project file) and can run the executable.  However, when my launcher application tries to run my test vi I get the same missing VI error.  The missing vi is \vi.lib\express\express input\SimulateSignalBlock.llb\subSigGeneratorBlock.vi.

 

So, it seems that the VI server runs up the application OK when running in the Labview development system.  However, when it is launched outside of this the launched test vi cannot locate its dependencies, which leads me to think there must be a linking problem when executed at runtime.  I can see all of the dependencies in the project file and these are listed in their correct location.

 

Has anyone had an experience similar to this, or got any idea what is going wrong.  As stated above, this technique worked ok in Labview 7.x using DAQmx so I'm wondering if something has changed in the way the runtime looks up dependencies?

 

Regards,

 

David
0 Kudos
Message 1 of 3
(3,459 Views)

Hi David,

 

I am not sure why this is happening. Have you tried recreating the DLL from LabVIEW 2009? Are all your subVIs and the main VI in a source distribution?

These two knowledgebase articles address error 1003 coming up when the VI is being called by an executable:

  http://digital.ni.com/public.nsf/allkb/644C66077212FC218625760F004C6733?OpenDocument

  http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/410f2ec66f60f9b0862569ee006f4fa0

Vivek Nath
National Instruments
Applications Engineer

Machine Vision
Message 2 of 3
(3,430 Views)
Solution
Accepted by David_Jackson

HI Vivek,

 

Thanks for your suggestions.  Solution 2 from the first link (creating a source distrubution) enabled me to create an LLB containing all of the dependent vi's in it.  I am now able to open and run my test vi without errors using VI server functions from VB6.  I am have rebuilt my main application but have a huge file (> 40MB) when including all dependencies, vi.lib, instr.lib and user.lib files.  The application can now be run ok but I am now working at optimising its  size.  Its looks like I have a working solution though.

 

Thanks for your help,

 

David

Message 3 of 3
(3,420 Views)