Example Code

Custom Slider Control (with Nyan Cat Images)

Code and Documents

Attachment

Overview
This is a custom slider control I created that shows the ability to create Custom Controls in your LabVIEW application.


Description
The VI create a custom slider with Nyan Cat. From Wikipedia (http://en.wikipedia.org/wiki/Nyan_Cat😞 Nyan Cat is the name of a YouTube video uploaded in April 2011, which became an Internet meme. The video merged a Japanese pop song with an animated cartoon cat with the body of a Pop-Tart, flying through space, and leaving a rainbow trail behind it. The video ranked at number 5 on the list of most viewed YouTube videos in 2011.  

This was accomplished using only two images:

  1. An animated .gif file of the cat
  2. A rainbow image (.jpg) used to fill the slider

The attached files include the Control (.ctl), Images used (.gif, .png), and a Main VI that demos the control and bounces the Nyan Cat back and forth.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download and unzip the attached file to your computer.
  2. Open the VI “Nyan Cat Custom Slider 2012 NIVerified.vi”.
  3. Run the VI.

 

Additional Information or References
VI Snippet

 VI Snippet.png

Front Panel

 Front Panel.PNG

 

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

 

Jared A.
Applications Engineer
National Instruments

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

Comments
David-A
NI Employee (retired)
on

nyan nyan nyan

timtamslam
Active Participant
Active Participant
on

When teaching anyone about Type Definitions... this is probably one of the best control examples. Ever. Well played Jarred!

Tim A.