< >此贴为转贴:</P>
< >曾见到有朋友找数据实时显示与存储的资料,在此我贴一些关于自己所作项目的内容。由于某些原因,不能够将程序完整贴出,只给出了主VI关键部分的框图,sub vi 数据采集与转换的完整代码,sub vi 数据保存的完整代码
在程序里采集7路信号,并发出两路控制信号(图中没显示),采样率为2K。
程序可以持续进行数据的实时采集显示保存。
成功进行实时显示与保存与一下几个因素有关:
缓冲区的大小。当采样率*采样通道数提高后,增大缓冲区
计算机的整体性能,尤其是硬盘的读写速度。
程序在进行过一次优化后采样率设置为5k,可以正常工作。
<img src="attachments/dvbbs/2004-11/20041126182821230.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2004-11/20041126182821230.jpg\');}" onmousewheel="return imgzoom(this);" alt="" />
<img src="attachments/dvbbs/2004-11/20041126182821678.jpg" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor=\'hand\'; this.alt=\'Click here to open new window\nCTRL+Mouse wheel to zoom in/out\';}" onclick="if(!this.resized) {return true;} else {window.open(\'attachments/dvbbs/2004-11/20041126182821678.jpg\');}" onmousewheel="return imgzoom(this);" alt="" />
</P>
[此贴子已经被作者于2005-9-19 13:32:19编辑过]
|