I tried to run OpenOPC with the current Python 3.2 and I realized it does not work.
Now I installed the old Python 2.6.6 and it also does not work, it gives me an "invalid class string" from line 170.
I also tried to run opc.exe from the windows console but I get the error "Failed to initialized an OPC automation class from the search list '…' - Dispatch: invalid class string"
Does anyone know what the problem could be?
I use windows xp and installed the pywin32 package.
Have you installed Pyro (python remote objects) ?
Hello and thanks for the quick reply!
I just installed Pyro but the it did not solve the issue.
I have a feeling that some of the required dlls are missing or corrupted, as I first installed python32, then 27 and finally 26. It might be a big mess on my disk. What paths do I need to set in order for the correct dlls to be accessed? Also, is it enough to just paste the openopc.py in the python folder or do I need something else?
depends on how you're trying to use it - if you are just running the gateway service and then running the executable (precompiled) then you don't even need python. if you're running your own programs that access the openopc library (openopc.py), then you'll need to have (i believe) a 2.5 / 2.6 / 2.7 python installed - plus pyro - and have openopc.py in the same folder as your own program (yourprogram.py and openopc.py in same folder).
The gateway service, that's what I was missing! I did not install it before running the OpenOPC…
Sorry I wasted your time, I feel dumb. Thanks for the great help!
No sweat buddy - I feel dumb every day - it's usually just before something awesome happens…
I'm having a problem with OpenOPC in DCOM mode.
I would like to connect to a local OPC server (Matrikon simulation server) from my Python program but I'm getting "OpenOPC.OPCError: Dispatch: Invalid class string"
Line that triggers this exception is "opc = OpenOPC.client()"
OpenOPC.py and SystemHealth.py are in the source folder and OpenOPC is imported.
It's interesting that with opc.exe I see Matrikon.OPC.Simulation server and can read tag values but "opc.py -q" returns:
"Failed to initialize an OPC Automation Class from the search list 'Matrikon.OPC.Automation;Graybox.OPC.DAWrapper;HSCOPC.Automation;RSI.OPCAutomation;OPC.Automation' - Dispatch: Invalid class string"
What am I missing?
OS: Windows 7 x64
Python: 2.7.5 64bit
OPC Core components & SDK: v2 and v3
Hi, I got the same problem just like yours, have you solved that? how?
I just ran into this last week, and resolved it.
-- OpenOPC cannot find the Automation DLL (there are several it checks for, one from Rockwell, one from Kepware, one from Matrikon, Honeywell, Yokigowa, and the generic GrayBox Wrapper.) If it can't find any - it throws that fault.
In my case, it was because I was using 64 bit Python with 32-bit OPC Servers and a 32 bit Automation DLL.
Now, if you've got a 64 bit OPC Server, then Graybox has released a 64 bit version of the DLL, which you can get here... http://www.gray-box.net/download_daawrapper.php - move it to c:\windows\system32\ and run c:> c:\windows\system32\regsvr32.exe grayboxwrapperdllfilename - and use 64 bit Python.
However, if you're in a mixed environment, then the 32-bit wrapper from the same download will work - move it to c:\windows\syswow64\ and run c:> c:\windows\syswow64\regsvr32.exe grayboxwrapperdllfilename - and use 32 bit Python.
It's worked! thank you.
I was too busy that time, and did not reply your comment.
I don't remember how and if I have resolved it.
I'm using the OpenOPC mode and it works great. OpenOPC service needs to be installed and started on the server machine.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.