Example Code

Using property nodes to create a Christmassy letter tumbler Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
An example of using property nodes to programmatically modify string indicator attributes to create a Christmassy letter tumbler.


Description
Every 130 ms, chose a random letter from the 26 letters English alphabet to be displayed on each string indicator. Change the properties of the particular string indicators to: Justification = Center, Text Color = Red. Finally, write "MERRY CHRISTMAS" to the String Indicators.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and open the project
  1. Run Letter Tumbler.vi 

Additional Information or References
VI Block Diagram

 5-302.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Technico
Member
Member
on

Complexity/Readability of the code can be improved a lot by adding the indicators into a cluster.

The properties of the different controls can be set by getting the refererences of the controls

and setting all of the properties in a FOR-loop.

Cluster to array and array to cluster can also make it a bit more clear.

If you keep the GUI in its current state the you can even replace with a single 2D-array and only 1 property needs to be set.

CappellaioMatto
Member
Member
on

also defer panel update prior setting letters and unlock after setting letters to improve system performance.