Example Code

Displaying Digital Clock using LabVIEW

产品和环境

本部分要求填写创建该范例所需的产品和操作系统。

如要下载NI软件(包括以下所示产品),请访问ni.com/downloads

    软件

  • LabVIEW

代码和文档

添加附件

Overview
This application displays the real world current time as a digital display as you would see on an old digital alarm clock.


Description
The attached VI shows how to convert the current time into array elements in order to populate the individual second/minutes/hours arrays. The program uses custom controls consisting of LEDs and clusters to form the digital display.


Requirements

  • LabVIEW Base Development System 2012 (or compatible)


Steps to Implement or Execute Code

  1. Unzip the attached folder "Digital Clock 2012 NIVerified.zip"
  2. Open the project file "Digital Clock 2012 NIVerified.lvproj"
  3. Open the “Digital Clock 2012 NIVerified.vi”
  4. Run the VI

 

Additional Information or References
VI Front Panel

front.PNG

VI Block Diagram

block.png

 

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


Larry Colvin
Associate Principal Engineer
Dyson Technology Ltd.

NI社区“代码范例交流区”(Example Code Exchange)中的代码范例已获得MIT许可