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

Reusing memory


To keep memory usage manageable, it is desirable to declare a chunk of memory for reuse. LabVIEW does memory management automatically. However, for very large array, extra caution is required to ensure that memory usage is efficient. In this recipe, we will develop a timer array action engine.

How to do it…

To create an action engine, we start by placing a while loop on a block diagram and place a case structure within the loop.

  1. In the action engine, the Initialize case will create a user-specified number of data value references with the new data value reference node in a for loop. The created references are saved in a shift register as an array, as shown in the following screenshot:

  2. The second case of the action engine implements the Start Timer and Unpause Timer commands. It puts the current timestamp to the reference of the specified index. The In Place Element Structure is used. It operates the values of memory locations in place without allocating extra memory, as shown...