American Association for Aerosol Research - Abstract Submission

AAAR 37th Annual Conference
October 14 - October 18, 2019
Oregon Convention Center
Portland, Oregon, USA

Abstract View


Asynchronous Functional Reactive Programming for Data Acquisition and Instrument Control: Example of a Free Software Implementation for Operating Scanning Mobility Particle Sizers

MARKUS PETTERS, North Carolina State University

     Abstract Number: 205
     Working Group: Instrumentation and Methods

Abstract
Professional societies and funding agencies are moving towards open data policies that require publication of raw data and computer software used to generate results. Consequently, instrument control and data acquisition (DAQ) software ought to be shared with publication. Most manufacturers only distribute proprietary code in binary format with their instruments. Research groups that build new instruments often use proprietary special-domain languages such as LabVIEW to implement the DAQ software. Both models are unsuitable for publication and difficult to evaluate for correctness. Furthermore, DAQ software design principles are rarely debated in the scientific literature, thus slowing advances in instrument development. Here I show that functional reactive programming principles are well suited to construct reliable, efficient, and concise code for data acquisition and instrument control. The approach uses a textual syntax with a functional programming style, signal-based data structures, asynchronous event processing, and interfaces with a graphical user interface. To demonstrate the utility of the approach, free software to operate differential mobility analyzers (DMA) in scanning mode for size distribution measurement is shared. The code controls the instrument and acquires multiple data streams at two frequencies using a multifunction DAQ device and serial communication on a Linux platform. Raw DMA response functions are inverted in real time using the methodology described in Petters (2018, AS&T, doi:10.1080/02786826.2018.1530724). With moderate financial and time investment, the software can be used as is to operate a complete scanning mobility particle sizer system using a DMA column, high-voltage power supply, and detector. The software can log multiple auxiliary sensors and be adapted to build more elaborate programs controlling tandem DMA setups with complex duty cycles. The software design principles are general, portable to several common programming languages, and can be applied to a wide range of instrument automation scenarios.