Rapid development of automated instrument control using Python ...

41 downloads 1485 Views 415KB Size Report
We have demonstrated that instrument validation functions added to core data system software using Python script language. It was not necessary to change.
Proceedings of the 54th ASMS Conference on Mass Spectrometry and Allied Topics

Rapid development of automated instrument control using Python script language 1 1 1 2 Kenji Nagatomo ; Toshinobu Hondo ; Jun Tamura ; Robert Cody 1 2 JEOL Ltd., Akishima, Tokyo, Japan; JEOL USA Inc., Peabody, MA Overview

Methods

We have demonstrated add-on software development using Python that adds functionality to the existing commercial MS data system w/o changing core data system software. We have added a function that is monitoring MS parameter and spectrum in real time and automatically report signal to noise ratio of the spectrum. This application software can be used as real time mass spectrum evaluation for instrument validation purpose. We have investigated applicability of Python extension based on Microsoft ActiveX technology as an interface technology.

Introduction Modern mass spectrometers are fully controlled by data system software that is commercially available, usually supplied by the instrument manufacturer. Such a software provides enough features for general purpose control and data processing. However, general purpose software is difficult to adapt for specific application areas. Customization that is available from most manufacturers is expensive and many users would like to have the ability to do this themselves.

Prototype of LC-TOFMS coupled with MassCenter3 data system software was used as model core data system software. Komodo, Active State Software Inc., Canada was used for development and debugging Python script. Python 2.4.3 windows installer and Python win32com extension were obtained from www.python.org as binary form. Python Win32 extensions, which was used in order to access ActiveX was obtained from www.python.net. wxPython and tkinter were used for GUI widget libraries.   MassCenter3 was consisted from sort of ActiveX and COM objects implemented in DLL in-process server. Python has capability to call script from core software that is usually developed in C/C++ and also Python can call C/C++ function in DLL. Using this method as an interface to core MS data system software, each software will be highly dependent to others that will loose an ease of maintenance and also required painful effort for interface code writing. In order to gain access to MassCenter3 from Python, we have chosen Python ActiveX extension as an interface technology. In order to gain access from Komodo Python debugging environment to running MassCenter3, small stab thread initialized with following code fragment was created. This is exposing COM interfaces and allows access to object instance exists in MassCenter3 process space.

Function

Qualification of actual values of MS control parameter compared with set parameters.

Qualification of spectral signal to noise ratio.

Period of development

3days

5days

Number of programmer

1

1

Total lines in application

1286

359

Professional

Beginner

Programming skill

Windows XP

Compiler (e.g. C++)

Script (e.g. Python)

Processing speed

Fast

Slow

Functions

A few

Many

Complicated

Easy

Programming

 We have developed two instrument validation software using Python; 1) Monitoring MS parameters in real-time, 2) Qualification of spectral S/N.

STDMETHODIMP CDaemon::Initialize() { HRESULT hRes = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE); return hRes; }

Comparison of program language; Type

Results

Validation software (Python) Control of the instrument Evaluation of mass spectra

ActiveX

Python’s features; Is an easy to use language that makes it simple to get your program working. Is easily extended by adding new modules implemented in a compiled language such as C or C++. Runs on many different platforms: Windows, Linux/Unix, MacOS… Is free software. It doesn’t cost anything to download or use Python.

(2) (1) Fig. 2 The views of validation software; 1) Monitoring MS parameters in real-time, 2) Qualification of spectral S/N.

Mass Center 3 (C++) LC-TOFMS

MS instrument control Data processing CORBA Fig.1 Software diagram.

 Using Python for add-on software development enabled application development: In short-term. By small numbers. In small-scale cades. By beginner as programmer. No core software changes and no special software design other than using ActiveX.

Conclusions We have demonstrated that instrument validation functions added to core data system software using Python script language. It was not necessary to change core data system and additional code for Python interface development. Newly developed validation software is monitoring instrument parameter and spectra in real time. We would like to keep investigation to extend this technique for auto tune and also data dependent MS acquisition. Features of add-on software development using Python are: Rapid development. Customization and extension Adaptability for specific application area.

Suggest Documents