Online Forums
Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.
Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.
Do not use the Contact page for technical issues.
COM Exception
Please Log in or Create an account to join the conversation.
- berisha.rinori
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
Another thing related to this issue. I got it to subscribe, as I mentioned.
When I install the service, it does subscribe but when the tag value changes, it does not call the callback method. Also, when I try to write to any tag, I get a timeout exception.
Here's the inner exception message:
"Write not completed. This error indicates that it could not be verified that the requested write operation was completed during the timeout period. It is possible that the write operation will actually succeed or fail, but later. Increase the timeout period if you want to obtain positive or negative indication of the operation outcome. Other reason for this error may be that under heavy loads, topic request or response queue is overflowing. Check the event log for queue overflow errors (if event logging is supported by the product and enabled)."
In Debug it works fine, but when I build it for release and install it (as a network service), then this issue comes up.
Thank you for your time.
*******EDITED******
Just got it working again. It turns out I hadn't done the appropriate DCOM configuration. And yes, I had to release it as LocalSystem Service. All is well now.
Hope someone finds this useful.
Please Log in or Create an account to join the conversation.
It is funny, because I have actually looked up a documentation to your server and "verified" the correctness of the ProgID - but have not noticed the typo either.
Best regards
Please Log in or Create an account to join the conversation.
- berisha.rinori
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
The problem was the one you pointed out, the name of the OPC server actually was "CyProOPC.DA2" not "CyBroOPC.DA2".
Thank you or you time.
Please Log in or Create an account to join the conversation.
- berisha.rinori
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
The machine I'm coding (and testing) is 64bit, and in visual studio the platform I have targeted is "Any CPU", not 32bit or 64bit specifically.
In fact, I just tested it by targeting 32bit and 64bit platforms, and still the same.
I'm trying to make a windows service to subscribe to tags, could this have anything to do with it?
Thank you for you time.
Please Log in or Create an account to join the conversation.
Does the same ProgID work from other OPC clients?
Is this on a 64-bit system? If so, are you running your service in a 64-bit process, or in a 32-bit process?
Best regards
Please Log in or Create an account to join the conversation.
- berisha.rinori
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
Here's the line for subscribing:
OPCClient.SubscribeItem("", "CyBroOPC.DA2", "CyBro-2.12345.cybro_qx00", 1000, tagc);
where 'tagChanged' is the callback method. Of course this is just a test code line I used to quickly check if everything is OK.
The OPC server i local, here "" for the machine name.
"CyBroOPC.DA2" is the name of the OPC server.
"CyBro-2.12345.cybro_qx00" is the tag
1000 is the refresh rate.
Any ideas?
Please Log in or Create an account to join the conversation.
The error most likely means that the ProgID used to identify the OPC server (in the SubscribeXXXX call) does not correspond to any OPC server on the target computer.
- Which OPC Server are you trying to subscribe to?
- Is the server local or remote?
- What ProgID are you using?
- Can you post the piece of code that calls SubscribeXXXX (including the part that fills in its arguments)?
Best regards
Please Log in or Create an account to join the conversation.
- berisha.rinori
- Topic Author
- Offline
- Senior Member
- Posts: 7
- Thank you received: 0
I'm developing a Windows Service, which will have a single EasyDAClient for subscribing/writing/reading from/to the OPC Server.
When I try to subscribe, the subscription is done without any error, but when it calls the callback method, I get the following error:
"[12585987] *** System.Runtime.InteropServices.COMException (0x8004001F3): Invalid class string"
Can anyone tell whats is this error related to? And how could I remedy the situation here?
Thank you in advance,
Rinor Berisha
Please Log in or Create an account to join the conversation.