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

Creating a simple animation


A picture is worth a thousand words, and an animation is worth even more. In this recipe, we will create a simple animation with a picture ring.

Getting ready

To complete this recipe, the LabVIEW development environment is required. In this example, LabVIEW 2012 is used. For the animation, a set of fan blades pictures that are differed by 30 degrees are needed from 0 to 330 degree (12 pictures total). The pictures must be sized appropriately for the application.

How to do it…

We will start by creating the picture ring with snapshots of a blade's motion, which we will iterate through to create the animation:

  1. Create a picture ring by right-clicking on the front panel and navigating to Classic | Ring & Enum | Pict Ring.

  2. Drag the fan blade picture at 0 degree into the picture ring.

  3. Right-click on the picture ring and select Add Item.

  4. Repeat steps 2 and 3 until all pictures are added. For the last picture, step 3 is to be omitted.

  5. Right-click on the control and select Make...