[python-win32] problem accessing OPC clients from thread

caxelrud caxelrud at pav.com
Tue Jan 22 11:56:02 CET 2008


Hi,
I need some help on OPC and Python (using makepy and Matrikon simulator).
I am getting an error when trying to AddItem.
The error is:
The item definition doesn't conform to the server's syntax.
OPC_E_INVALIDITEMID  0xC0040008L

Any idea ?
Thanks
Here the code:
>>> import win32com.client
>>> opcserver=win32com.client.Dispatch('OPC.Automation.1')
>>> opcserver.Connect('Matrikon.OPC.Simulation.1')
>>> groups=opcserver.OPCGroups
>>> group=groups.Add('Group1')
>>> items=group.OPCItems
>>> item=items.AddItem('File1.item1',1)
>>> item=items.AddItem('File1.item1',1)
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "<COMObject <unknown>>", line 3, in AddItem
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0,
-1073479672), None)
 

-- 
View this message in context: http://www.nabble.com/problem-accessing-OPC-clients-from-thread-tp14111917p15012041.html
Sent from the Python - python-win32 mailing list archive at Nabble.com.



More information about the python-win32 mailing list