Python in Process Control?

Phil Schmidt phil_nospam_schmidt at yahoo.com
Sat Oct 2 20:49:42 CEST 2004


Wolfgang Keller <wolfgang.keller.nospam at gmx.de> wrote in message 

<snip>

> ...does really noone use Python for industrial control applications?



This isn't quite industrial control, but the principle is similar:

I used Python, along with Mark Hammond's win32 extensions and
pyserial, plus a Dearborn Group VSIC2 interface to create a GM (as in
General Motors) Class 2 bus tool. It was (for me) a general-purpose
tool, allowing me to get real-time bus traces, as well as simulate
portions of vehicle communications for testing, extract diagnostic
codes, log bus traces to disk, and etc. The program used an event loop
on a virtual internal bus, which allowed me to quickly and easily
create new tool applets (Tkinter gui's) and just plug them into that
virtual bus. I had a couple dozen applets that I created and used.

I started the project unsure if Python was up to the task, but I was
pleasantly surprised in the end. I polled the serial port to look for
messages from the VSIC2 box, and I was able to poll it at about 9000
scans per second in trace mode, and about 5000 scans per second with
all of my tools running, all on a circa-2002 Dell laptop. On a
10.4Kbaud vehicle bus, this was more than adequate performance.

Bottom line: Depending on the specific needs I think Python could
handle some process control tasks.



More information about the Python-list mailing list