Book Image

LabVIEW Graphical Programming Cookbook

By : Yik Yang
Book Image

LabVIEW Graphical Programming Cookbook

By: Yik Yang

Overview of this book

<p>LabVIEW is a graphical programming development environment for problem solving, accelerated productivity, and continual innovation. It integrates all the tools that engineers and scientists need to build a wide range of applications in a short amount of time. It offers unprecedented integration with existing legacy software, IP, and hardware, while capitalizing on the latest computing technologies.</p> <p>LabVIEW Graphical Programming Cookbook is a concise and fast paced guide to help you gain a comprehensive understanding of the different features and programming practices in LabVIEW. All the concepts in the book are described with the help of examples. This book also shows you how to pass data using STM, in addition to helping you understand different ways to handle errors.</p> <p>You will start by learning about LabVIEW settings, and then, the different features of LabVIEW using the front panel and block diagram. For the front panel, a variety of tips on creating a user interface are provided. For the block diagram, different architectures such as master slave architecture and state machine architecture are demonstrated, along with how data is passed among different sections of the code. Finally, the book shows you different ways to work with external code in DLL format and external applications.</p>
Table of Contents (17 chapters)
LabVIEW Graphical Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Compiling a standalone application


After we compile an executable and deploy it on a machine, we cannot run the executable immediately. We must set up the machine with the correct software before we can run the executable. It is troublesome if we have to install multiple software on the machine before we can run the executable. In this recipe, we will learn how to package the executable with the required software into one installer, so that we only need to double-click on the installer and everything will be installed automatically.

How to do it

A standalone application is just an installer that comprises an executable and drivers required by the executable. We will use an executable that we created previously.

  1. We will open the project ExeExample.lvproj from the recipe where we learned how to compile an executable. We right-click on Build Specification and select New | Installer; the My Installer Properties dialog, where we can set up the properties of the installer, appears.

  2. In the Product Information category, we specify the Build specification name with ExeExampleInstaller, Product name with ExeExample, and Installer destination with a convenient place for the example.

  3. In the Destination category, we can set up where the content of our program will go. We will use the default setting, and that will create a folder inside the Program Files folder in your local drive.

  4. In the Source Files category, we select the executable and all relevant files on the left and transfer them to the right.

How it works...

In a compiled standalone application, it can be sent as an installer to deploy onto another machine. In the installer, everything that is needed to execute a program is included. The user only needs to double-click on the received installer, and the program with all its dependencies will be installed automatically.

In the Additional Installers category, we select all the additional installers that our program needs during execution. At the very least, the NI LabVIEW Run-Time Engine is needed. If you used other features such as DAQmx, VISA, FPGA, and so on, more installers will be needed. If you are unsure about what is needed, click on each installer and read its description to see whether the installer describes a feature in our code or not.