Example Code

Attitude Indicator - Made Embeddable in LabVIEW Application

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
This is a modified version of the Artificial Horizon 3D Picture Control first posted in the NI Discussion forums and later modified to improve readability as a community example. This example is a modification of the previous example in order to make the attitude control more easily embedded in existing LabVIEW applications and to have multiple instances of the indicators that are controllable on the same front panel.


Description
The attitude control uses the standard LabVIEW model of Open, Read/Write, Close for initializing the 3D Picture Control associated with the Attitude indicator and updating the Roll, Pitch, and Yaw being represented in the indicator. A shift register is required to maintain the state of each control during each iteration of the update loop. The following is an example program that shows multiple controls being updated and run independently:

Note: It appears that the flickering effect discussed in the forum above is more pronounced when utilizing multiple controls at the same time.

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip “Attitude Indicator 2012 NIVerified.zip”
  2. Open " Attitude Control 2012 NIVerified.lvproj"
  3. Open “Attitude Control Test.vi” under the Examples folder
  4. Run the program

 

Additional Information or References
Main VI Block Diagram

 5-175.PNG

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


Milan

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

Comments
brentjustice
Member
Member
on

Just wanted to say thank you for an excellent piece of code.  I have implimented it in my project here -->

https://decibel.ni.com/content/docs/DOC-40895

jayanthi
Member
Member
on

Dear Sir,

Thanks for your reply.

But  there is no value indication in vertical scroll bar.I could not customize that control also.

 

Regards

Jayanthi