›› 2017, Vol. 30 ›› Issue (9): 75-.

• 论文 • 上一篇    下一篇

基于LabVIEW的生产者/消费者模式研究

黄世泉,金晅宏   

  1. (上海理工大学 光电信息与计算机工程学院,上海200093)
  • 出版日期:2017-09-15 发布日期:2017-11-03
  • 作者简介:黄世泉(1993-),男,硕士研究生。研究方向:信号获取与处理。金晅宏(1978-),女,副教授。研究方向:信号获取与处理等。

Research on Producer/Consumer Pattern Based on LabVIEW

HUANG Shiquan,JIN Xuanhong   

  1. (School of Optical-Electrical and Computer Engineering,University of Shanghai for Science and Technology, Shanghai 200093,China)
  • Online:2017-09-15 Published:2017-11-03

摘要:

在数据采集程序设计过程中发现,程序设计模式对数据采集和处理的效率有较大影响。因此,文中引入了LabVIEW生产者/消费者模式,并应用于多任务型音频信号采集系统程序的设计中。该设计将音频参数设置和数据采集处理分配给两个并行循环来完成,在生产者循环中完成音频信号参数的设置,在消费者循环中完成数据的采集与处理。实验表明,该模式大幅提高了数据采集与处理的效率,也提高了程序的可读性、扩展性、维护性和复用性。

关键词: LabVIEW, 消费者/生产者, 数据采集, 队列

Abstract:

In designing the data acquisition program, it is found that the design pattern of program has a great influence on the efficiency of data acquisition and processing. As for it, in this paper, LabVIEW producer / consumer design pattern is introduced and applied to the design of multi-task audio signal acquisition system. In this design, the audio parameter setting and data acquisition and processing are allocated to two parallel loops, and the parameters of the audio signal are set in the producer loop while the data collection and processing are done in the consumer loop, which greatly improves the efficiency of data acquisition and processing, and improves the readability, expansibility, maintainability and reusability of the program.

Key words: LabVIEW, producer consumer pattern, data acquisition, queue

中图分类号: 

  • TN912.3