Python in Process Control?

Neil Benn benn at cenix-bioscience.com
Fri Oct 1 15:15:51 CEST 2004


Hello,

          Just out of interest - which tecan robot were you interfacing 
to - every Tecan robot that I've ever programmed comes with a high level 
API (Toolbox, Gemini, Logic, WinWash, Magellen).  I would think however 
that controlling a tecan robot in the environment that it is typically 
being used in (life sciences R+D) is not industrial control (its my job 
BTW!).  It's not like making milk....

    IMHO, I think that Python is not a suitable piece of software for 
industrial control as it has poor support for bytes (a string shouldn't 
be used to store bytes!) and also bit twiddling is difficult (people who 
ask about his on the Python newsgroup are usually shouted at).  The 
other thing that is a problem for python in this is that it is very 
difficult in python to make your your client is aware of all the errors 
that you can throw and as you know, when controlling equipment there is 
a lot of things that are out of your control (an exception that is 
rarely thrown will often not be caught if the programmer never sees it 
running and gets lazy). 
    This is why checked exceptions (as they said in Fantastic Four - 
flame on!) in this area are very handy because you are forcing the 
non-expert to actively think about these use cases.  One thing that 
python is good for in this area is comms and threading, the GIL which is 
usually a pain in the arse makes multi-threaded IO heavy apps a little 
easier to write - although I still spent about 2 days trying to work out 
how to make a variable volatile (culminating in understanding the 
threading module!).  The serial module is good but I think that a model 
of input and output streams with listeners/observers would make far more 
sense, currently I have to make a polling loop to receive the data, the 
reason for this is that a machine may send serial data with being 
prompted and this obviously needs to be lexed seperatly than a <I've 
done your command here is the response> communication.

    Good to see that you didn't use ActiveX (if one more company 
_boasts_ that their equipment comes with 'industry standard' ActiveX I 
think I'm going to cry)!!  Believe it or not I still have to interact 
with some equipment using DDE!!!!

    This is probably off topic but it's Friday afternoon!!

Cheers,

Neil

-- 

Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany

Tel : +49 (0)351 4173 154
e-mail : benn at cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com




More information about the Python-list mailing list