LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stand alone executable vs source distribution

I have a few VIs that I need to run on my RT PXI System, but they need to be programmatically started and stopped from VIs running on my PC host.  Both commands and data are transfered between the VIs running on the PXI and the PC using Shared Variables.  The Share Variable Library resides on the PC.  The VIs running on the PXI make use of third party LabVIEW APIs, DAQmx, and niSync functions.  Eventually I would like to make the VIs on the PC stand-alone-applications that can run on computers that don't have LabVIEW.  Given these conditions; should I dynamically call the VIs on the PXI as VIs (making source distribution) or executables (making stand-alone application)?

I've enclosed a sample of a VI running on the PXI.  I am developing on LabVIEW 2011.

0 Kudos
Message 1 of 8
(4,272 Views)

Hi Faustina,

 

The main difference between this to options is the accessibility to the source code. For this kind of application, since you've mentioned you'll eventually like to have run the program on computers that don't have LV, and since the source code isn't something you will need to share I'll recommend you to use the application builder. Please note that for running this code LV Runtime engine needs to be installed on the computer that will run that code.

 

Please take a look here to see the Distributing Applications with the LabVIEW Application Builder tutorial

 

I hope this helps!

 

Kind Regards

 

Carlos O

Applications Engineer

National Instruments

0 Kudos
Message 2 of 8
(4,227 Views)

Okay, I must be missing something basic here ... I've looked at the tuturial and some other examples but for some reason when I try to programmatically call the .rtexe I can't open a reference to it.  The files have been FTPed to the RT PXI at the location specified in the path.  Is there something wrong with the calling syntax?

0 Kudos
Message 3 of 8
(4,205 Views)

Hi Faustina,

 

Regarding error 1124, this is likely to happen when the target VI is calling sub-VIs and DLLs.  You will need to create a source distribution that includes all dependencies and FTP it to the target. 

 

  1. Right-click on Build Specifications » New » Source Distribution.
  2. Click on Source Files and add the target VI to the Always Included list.
  3. Click on Additional Exclusions and uncheck Exclude files from vi.libExclude files from instr.lib and Exclude files from user.lib.
  4. Click Build.
  5. Open Windows Explorer and enter ftp://IP Address.
  6. Copy the source distribution to the target.

Note: Step 3 will increase the amount of space need because it will include primitive VIs from LabVIEW libraries. This step may not be necessary because these VIs should be included in the run-time installed on the RT target.

 

Please take a look to this KB that explains how to Programmatically Deploy a VI to a Real-time Target .

 

I hope this helps!

 

Carlos O

Applications Engineer

National Instruments

0 Kudos
Message 4 of 8
(4,154 Views)

I'm having a similar question.

 

I have a main VI that I want to run on a RT target (cRIO). I want this main VI to make asynchronous calls to VIs. I read that, in order to be able to do that, I need to deploy my application as a source distribution, and not as a stand-alone real-time application. Is this the case?

 

What are the advantages/disadvantages of deploying as a stand-alone real-time application vs. deploying as a source distribution?

0 Kudos
Message 5 of 8
(4,132 Views)

Hey Raul,

        The main difference between a source distribution and a stand alone application is access to the source code. As a stand alone application, the VIs are compiled into a single executable and the block diagrams are stripped from the application. As a source distribution the files are kept as individual VI's and can thereby be referenced, or called Asynchronously, as individual files. I hope this helps!

 

--Ryan S.

0 Kudos
Message 6 of 8
(4,099 Views)

Thanks Ryan,

I do understand the difference but I cannot grasp advantages/disadvantages of each. I guess that the standalone application will occupy less space when deployed and the source distribution has the advantage of enabling asynchronous calls of VIs.

What are other advantages/disadvantages? I.e. I guess that a deployed standalone application will protect intellectual property better, will it? Any other?

 

Thanks!

0 Kudos
Message 7 of 8
(4,065 Views)

You yourself said that you would want to run the program on pc's without LabVIEW. That requires you to create an exe with the application builder. Otherwise, you would need to purchase a license for each pc.

0 Kudos
Message 8 of 8
(4,061 Views)