Example Code

Creating an Analogue Clock Using Gauges

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

Download All

Overview

This quick and small example shows how to use customised gauges on the front panel to create an analogue clock.  

 

Description

This quick and small example shows how to use customised gauges on the front panel to create an analogue clock. The block diagram uses Invoke Methods to resize the gauges so that the size of the clock is automatically adjusted to fit to the size of the window.  The system time is retrieved and parsed into hours, minutes, seconds, and milliseconds. The values are converted to single precision. Fractional values are added on from its lesser significant unit, and values are checked to see if they will display properly on the dial.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

Download and Run the attached VI to see it working.

 

Additional Information or References

 

Front Panel

1.PNG

 

Block Diagram

2.png 

 

 

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

 

Regards,


Imtiaz Chowdhury
Project Manager
Green Running / Austin Consultants

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

Comments
MaGGy2012
Member
Member
on

thank u