17. Instrument Control with a Python Web Server

Type:
Poster
Audience level:
Intermediate
Category:
Embedded Systems
March 11th 8:35 a.m. – 8:40 a.m.

Description

We present a web server based instrument control system written in Python. There are a number of advantages as well as a number of issues that arose in using a web server framework, which usually present data from a database to control hardware. These advantages and issues, as well as our solutions to them, will be covered.

Abstract

At Protein Simple we have developed a line of scientific instruments controlled via a web browser whose software is written in Python. Traditionally instrument control has been done with a desktop application. We moved recently to web browser base instrument control and analysis which brought with it some novel, at least to us, issues.

There number of issues that arose in using a web server framework, in our case Django, which usually present data from a database to control hardware. These include large latency, unexpected hardware errors, and uncertainty in the state of the hardware. We developed a architecture that allows the Django server to run unaltered and largely separated from direct control and knowledge of the hardware. Our design takes into account Python's limited multi-threading and priority.