Example Code

Using Property Nodes to Create Orbiting Boolean Indicators

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
Coding that exemplifies how to make a boolean control orbit around another.

 

Description
This VI provides an example of how to move front panel objects programmatically. A boolean indicator moves in a circle on the front panel while a second boolean indicator moves in a circle around the first.

This VI creates the circular movements by changing the Position property of the LEDs. The VI controls the iteration count in the loop by a multiple of 2*pi and performs additional calculations to produce values in the range of -pi to pi. This VI then takes the sine and cosine of these values and uses the results to modify the x and y positions, respectively, of the LEDs.

 

Requirements
LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Stop execution with the Stop button.


Additional Information or References

Block Diagram.png

 

 

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