[python-win32] problem accessing OPC clients from thread
Jeff Peery
jeffpeery at yahoo.com
Fri Dec 14 01:36:37 CET 2007
.... I forgot to attach the code. here it is. Thanks.
Jeff
Graham Bloice <graham.bloice at trihedral.com> wrote:
Jeff Peery wrote:
> thanks for the beta!
>
> I think my main problem is that I don't really understand this code; I
> didn't write it. Could you recommend a book/website that describes
> what these functions like 'group.OPCItems.AddItem' do? For example,
> how do I know what a 'group' is or what the addItem() parameters are,
> or how to interpret that error code that you interpreted, and I'm not
> really sure if this code will work for other OPC servers other than
> the automation direct server.
>
> Also, where might I go learn about how to setup the event handler for
> a data change event?
>
> Thanks again, I appreciate your help!
> Jeff
>
The canonical definition of the OPC Automation interface API is the OPC
DA Auto 2.02 Specification. DA stands for Data Acquisition. The
originators of this document are the OPC Foundation, at
http://www.opcfoundation.org, and the specification is *so* open you
have to become a member to download it (at a cost of USD 1500). Grrr.
However, if your Google fu is up to it you might find a copy lying
around elsewhere, as I have run across it on several OPC Vendors sites.
I think I've also found it with several OPC Servers. I would recommend
that you get the Matrikon OPC Simulation server for testing, this
installs the Matrikon OPC Explorer which is a useful client app to work
out what's happening when your client doesn't work. This might give you
the docs. The document goes under various names such as opcda20_auto.doc.
Note that the docs are VB (VB6) based, but not too difficult to convert
to python.
You will also want to read up on creating event handlers in PyWin
--
Regards,
Graham Bloice
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20071213/2b2abee9/attachment.htm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testOPC.py
Url: http://mail.python.org/pipermail/python-win32/attachments/20071213/2b2abee9/attachment.txt
More information about the python-win32
mailing list