【摘要】时间是人类生活必不可少的重要元素,从古代的沙漏、十二天干地支,到后来的机械钟表以及当今的石英钟,都充分显现出了时间的重要性。随着社会的发展,人们对时间计量的精度要求越来越高,应用越来越广,功能要求越来越多。普通的机械钟表与半机械钟表对于当代人忙碌的生活显然早已不太适应,随着科技的进步,电子时钟应运而生,它不仅给人们生产生活带来了极大的方便,而且大大地扩展了时钟原先的功能。本课题研究的主要目的就是设计一个基于Labview的时钟系统,通过获取电脑的系统时间,并分离出给数字,在通过布尔显示显示它以指示灯、获取日期/时间(秒)、格式化日期/时间字符串、截取数组、局部变量、真常量、假常量等等,通过连接就基本制作好一个数码管电子钟了。关键词:虚拟仪器;Labview;时间;电子时钟AbstractTimeisanimportantelementofhumanlife,fromtheancienthourglass,12daysdryterrestrialbranch,tolatermechanicalclocksandtoday'squartzclock,arefullyshowntheimportanceoftime.Withthedevelopmentofsociety,peopletimemeasurementaccuracyishigherandhigher,usedmoreandmorewidely,thefunctionrequirementmoreandmore.Commonmechanicalclocksandhalfmechanicalclocksforcontemporarypeoplebusylifeobviouslyhadnottooorientation,withtheprogressofscienceandtechnology,electronicclockarisesatthehistoricmoment,itnotonlygivepeopleproductionlifebroughtgreatconvenience,butalsogreatlyexpandedtheclockoftheoriginalfunction.ThemainpurposeofthisresearchistodesignabasedonLabviewclocksystem,throughtheacquisitionofcomputersystemtime,andseparatetodigital,inthroughtheBooleandisplayshow.Itwithlight,acquisitiondate/time(inseconds),formattingdate/timestring,clippingarray,alocalvariable,andthetrueconstantandfalseconstants,etc.,throughtheconnectionofbasicmadeadigitaltubetheelectronicclock.Keywords:Virtualinstrument;Labview;Time.Electronicclock目录1绪论......................................................................................................................................................11.1课题的背景.................................................................11.2课题的意义.................................................................11.3国内外研究现状.............................................................21.4论文构成以及章节安排......................................................22虚拟仪器..............................................................................................................................................32.1虚拟仪器的概述.............................................................32.1.1虚拟仪器的特点及优势...................................................32.1.2虚拟仪器与传统仪器的比较...............................................42.1.3虚拟仪器系统的组成.....................................................42.1.4虚拟仪器的软件结构.....................................................52.2虚拟仪器的开发软件.........................................................62.2.1虚拟仪器的开发语言.....................................................62.2.2图形化虚拟仪器开发平台——LABVIEW......................................62.2.3基于LABVIEW平台的虚拟仪器程序设计.....................................72.3虚拟仪器的发展现状.........................................................82.3.1国外虚拟仪器的现状.....................................................82.3.2国内虚拟仪器的现状.....................................................92.4虚拟仪器的发展方向.........................................................93LabVIEW软件及其基本设计过程和相关的原理.............................................................................103.1LabVIEW简介..............................................................103.2LabVIEW软件设计基本原理...................................................103.2.1前面板................................................................113.2.2程序框图..............................................................113.2.3图标/连接器...........................................................123.3LabVIEW的操作模块.......................................................123.3.1工具模板..............................................................123.3.2控制模板(ControlPalette)...........................................133.3.3功能模板(FunctionsPalette)..........................................154总体设计.............................................................................................................................................174.1时钟显示的结构............................................................174.2设计总思路................................................................174.3软件设计..................................................................174.3.1获取时间的各整型数据..................................................174.3.2提取数字的各位........................................................184.3.3七段布尔显示控件编码..................................................184.3.4译码、布尔显示数字....................................................194.3.5闪烁..................................................................194.3.6字符移动装饰..........................................................194.4程序框图..................................................................205系统调试............................................................................................................................................21结束语........................................................................22参考文献......................................................................2311绪论1.1课题的背景公元1300年以前,人类主要是利用天文现象和流动物质的连续运动来计时。例如,日晷是利用日影的方位计时,漏壶和沙漏是利用水流和沙流的流量计时。东汉张衡制造漏水转浑天仪,用齿轮系统把浑象和计时漏壶联结起来,漏壶滴水推动浑象均匀地旋转,一天刚好转一周,这是最早出现的机械钟。北宋元祜三年(1088)苏颂和韩公廉等创制水运仪象台,已运用了擒纵机构。1350年,意大利的丹蒂制造出第一台结构简单的机械打点塔钟,日差为15~30分钟,指示机构只有时针;1500~1510年,德国的亨莱思首先用钢发