LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue deploying an app to a virtual machine

I have created two apps in NXG. One just loads and views TDMS files from a drive and it works just fine deployed to other machines. This app does not interface with any NI hardware. The other collects data from a cDAQ9185 and does some processing of the data. I have done no error handling in this app yet.

 

When I deploy the data collection app to my Windows 10 Pro virtual machine the app runs but does not collect any data at all.

 

Do I need to add drivers to my application? My dependencies are:

 

  • Measurement Studio Common Runtime for .NET Framework 4.0
  • NI Vision Core API Support for LabVIEW NXG 5.0 Runtime
  • NI-DAQmx Support for LabVIEW NXG 5.0 Runtime.

If it is not a driver issue then how would I go about troubleshooting this other than a very tedius series of adding troubleshooting code to my app and deploying the app to see what happens?

0 Kudos
Message 1 of 4
(843 Views)

In order to collect data from Hardware, the PC (real or virtual) must have the hardware connected to it, and must have drivers capable of communicating with it.

 

When you mention an "app", do you mean a LabVIEW "Application", built with the Application Builder?  If you moved the "app" to another PC that didn't have LabVIEW installed, would you expect it to run?

 

Note that I have very little experience with NXG (I've been using LabVIEW "Classic" for more than a decade, and find the attempt to transition to such an unfamiliar architecture extremely jarring ...).  I apologize if I've "answered the wrong question", but I think that your VM will, at least, need (some) LabVIEW drivers and Run Time support.

 

Bob Schor

0 Kudos
Message 2 of 4
(823 Views)

@Bob_Schor wrote:

In order to collect data from Hardware, the PC (real or virtual) must have the hardware connected to it, and must have drivers capable of communicating with it.

 

When you mention an "app", do you mean a LabVIEW "Application", built with the Application Builder?  If you moved the "app" to another PC that didn't have LabVIEW installed, would you expect it to run?

 

Bob Schor


Yes, I agree. I purchased Application Builder to build an installer for the application. I did not just move the app. Sorry if I gave you that impression. Application Builder identifies prerequisites automatically. That is why I posted the prerequisites that it automatically added, because I don't think it got the list correct.

0 Kudos
Message 3 of 4
(807 Views)

@flycast wrote:

I purchased Application Builder to build an installer for the application. I did not just move the app. Sorry if I gave you that impression. Application Builder identifies prerequisites automatically. That is why I posted the prerequisites that it automatically added, because I don't think it got the list correct.

Thank you for the clarification.  Some further comments:

  • You are using NXG, which is much "newer" than LabVIEW Classic, and its idiosyncrasies are unfamiliar to me, so I can't comment on how good a job its Application Builder does with Installers.  I know, for myself, I build a "pure app" and then install the LabVIEW Run Time Engine separately to any deployed system.
  • Maybe the App Builder does, in fact, work perfectly.  There is still the question of whether/how the VM supports the Hardware Ports that your Application requires.

Here's what I would suggest as a way to start drilling down on this problem:

  1. Build another VM (or clone your existing one).  Install LabVIEW NXG on it, trying to duplicate the system you are using on your Development PC.
  2. Copy your Project to the VM.
  3. Boot the VM and do the remaining steps here.
    1. Before doing anything else, open MAX and verify that you can "see" the Hardware that your program needs to use.  I'm betting (my standard amount, one dime) that one or more devices will not be present.  If so, this is a big clue and should inform the next steps you need to do, namely figure out what you need to do (or if it is even possible to do) to make the VM "see" your hardware.
    2. Assuming that the hardware checks out, go ahead and try to run your code without building it into an Application.  If it doesn't work, figure out why (you can debug a lot better in Development Mode than with a Built Application).
    3. Once (or if) you get the code to work in Development mode, Build it and see if it works as an Application.
    4. If that works, then something has gone awry with the App Builder's configuration of the Installer.
  4. If Step #3 was successful, meaning you got the App to work in the VM with all of LabVIEW installed, then it becomes a question of why the Installer you originally built failed.  As I said, above, I have little experience with Installers (I tried using them once, with an NI Support Engineer on the line walking me through the steps, and I still abandoned it as too fraught for my particular situation).  I might suggest trying the following:
    1. Build another VM (without LabVIEW).
    2. Build (on your Host) an Application (.exe).
    3. Copy the Build folder to the VM (I tend to put mine in Public Documents, hard to find in Windows 10, with a Shortcut to the Executable copied to the Public Desktop, allowing anyone to run it).
    4. Find the appropriate Run Time Engine on NI's Download page, and install it on the VM.
    5. See if it now works.

     Please report your progress.  I'm sure your case won't be unique, and your experience (especially if you find out what works!) will be valuable to the Community.

 

Bob Schor

0 Kudos
Message 4 of 4
(767 Views)