Python in Process Control?

erik.wilsher at gmail.com erik.wilsher at gmail.com
Fri Oct 1 13:24:09 EDT 2004


I work with process automation myself, and I belive that writing an OPC
server is *not* a trivial task, even in python.  There are some good
books available on this subject, the OPC-foundations home page contains
some good references.

If you want to get started with client code quickly, you could try the
QuickOPC ($) library from OPC-labs (www.opclabs.com).  Setting up a
client in python with that library is three lines of code (really!):
------
import win32com.client
import time
s = win32com.client.Dispatch('OPCLabs.EasyDA')

def test(times=10000):
v = s.ReadItem('','Matrikon.OPC.Simulation', 'Saw-toothed
Waves.Real8','',0)
t0 = time.clock()
for i in range(times):
v = s.ReadItem('','Matrikon.OPC.Simulation', 'Saw-toothed
Waves.Real8','',0)
    print time.clock()-t0

test(1000)




More information about the Python-list mailing list