- Posts: 71
- Thank you received: 10
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.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- 0xc0040406 returned from the WriteItemValue method (OPC_E_NOTSUPPORTED)
0xc0040406 returned from the WriteItemValue method (OPC_E_NOTSUPPORTED)
Sent: Sunday, June 20, 2010 8:52 PM
To: R.
Subject: RE: WriteItemValue
R.,
The bug is now fixed, the new build with the fix is 5.01.253.1. Note the change is minor version number (5.00 to 5.01) – this is because we have switched the building tools from Visual Studio 2008 to Visual Studio 2010, with some side effects such as that a different C++ redistributable package is now included in the install.
Only QuickOPC-COM (OPCData-COM) has been affected; QuickOPC.NET (OPCData.NET) did not have this problem.
Best regards,
ZZ
From: Zbynek Zahradnik
Sent: Wednesday, June 16, 2010 3:05 PM
To: R.
Subject: RE: WriteItemValue
R.,
Great - I have loaded the file into the server, and ran the script you have provided. And, it is reproduced - I can see the same error.
I now must switch to something else for a moment, but definitely I have everything that is needed from your side. I will let you know when I know more – most likely by tomorrow.
Best regards,
Zbynek Zahradnik
Please Log in or Create an account to join the conversation.
Sent: Wednesday, June 16, 2010 2:58 PM
To: Zbynek Zahradnik
Subject: RE: WriteItemValue
Zybnek,
Here is the xml file. Hopefully this is what you need.
R.
From: Zbynek Zahradnik
Sent: Tuesday, June 15, 2010 10:30 AM
To: R.
Subject: RE: WriteItemValue
R.,
Still no success here. What the customer had sent is the Aliases file, but that aliases don’t work because they are referencing things in the server configuration that I do not have. The full server config needed is .xml file.
Regards
Zbynek Zahradnik
Please Log in or Create an account to join the conversation.
Sent: Tuesday, June 15, 2010 2:17 PM
To: Zbynek Zahradnik
Subject: RE: WriteItemValue
Hello Zbynek,
Attached is a csv file with the server configuration. The customer seemed to indicate that all you need to do is import it back in. At this point they have decided to move to a different client application, so there is not an immediate rush on getting this done- although I'm sure it will pop up again in the future if there really is a problem in the code. Or even if the problem is with the server, it would be nice to know if there is a work around.
If you need any other information, just let me know.
Thanks,
R.
From: Zbynek Zahradnik
Sent: Sunday, June 13, 2010 9:54 AM
To: R.
Cc: w.
Subject: RE: WriteItemValue
R.,
I have downloaded a demo of that server, but I have not figured out how to configure it so that I get some writeable tag. Can you please ask the customer to send us the configuration file for the server?
I have also tested the code with Matrikon Simulation server, and it works fine.
Regards,
Zbynek Zahradnik
From: R.
Sent: Wednesday, June 09, 2010 8:15 PM
To: Zbynek Zahradnik
Cc: w.
Subject: WriteItemValue
Hello Zbynek,
I have another customer who is not seeing the same error code 0xc0040406 when using the WriteItemValue method. He said that if he uses the demo server everything works. However, trying to write to his Matrikon server returns that error.
‘VBScript
Dim vtq
Dim OPCClient
Set OPCClient = CreateObject("OPCLabs.EasyDAClient.5.0")
Set vtq = OPCClient.ReadItem "", "Matrikon.OPC.IEC60870.1", "IDS750.IDS3"
OPCClient.WriteItemValue "", "Matrikon.OPC.IEC60870.1", "IDS750.IDS3", 1
I think we may need to tak another look at this one after all. Let me know if there is anything else you need from me.
R.
Please Log in or Create an account to join the conversation.
Sent: Friday, June 04, 2010 2:19 PM
To: Zbynek Zahradnik
Subject: RE: WriteItemValue
Zbynek,
I received an email this morning from this customer. He said he downloaded the latest version and they don't seem to be having trouble with it anymore. They must have been doing something wrong to begin with. So, at this point, they seem to be okay with everything. Sorry to bother you with this.
R.
From: Zbynek Zahradnik
Sent: Wednesday, June 02, 2010 12:20 PM
To: R.
Cc: w.
Subject: RE: WriteItemValue
R.,
Yes the error code meaning that you have found is correct. The component does not “generate” this code, it is coming from the OPC server. The only question is, why. Either the component is attempting to do something that it shouldn’t, or the server is not responding correctly. I will try to reproduce it, and will let you know then.
Best regards,
Zbynek Zahradnik
From: R.
Sent: Tuesday, June 01, 2010 4:27 PM
To: Zbynek Zahradnik
Cc: w.
Subject: WriteItemValue
Hello Zbynek,
I am working with a customer who is seeing an error code 0xc0040406 returned from the WriteItemValue method of the DataCom-5.0. I have copied part of his email that explains the problem below.
********************************
I used the method ReadItem to read an item from an OPC server. It works perfectly. Then I used InvokeWriteItemValue to write an item. The item was written successfully.
When I tried to write an item with WriteItemValue the error C0040406 occured. I searched for the error code C0040406. I found that it’s the OPC error code for the server does not support writing of quality and/or timestamp. I don’t understand that because WriteItemValue does not write quality and timestamp. This is the code:
Set OpcWebClient = CreateObject("OPCLabs.EasyDAClient.5.0")
OpcWebClient.WriteItemValue "", "Matrikon.OPC.IEC60870.1", "IDS750.BF1", 13
*****************************
I have not been able to reproduce this error. I tried it with [... ]TOP Server and [...] OPC DataHub while disabling the 3.0 interfaces ( based on W.'s comments that writing to the quality and timestamp was a feature added in 3.0).
Any help would be appreciated. Thank you in advance.
R.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in COM
- Reading, Writing, Subscriptions, Property Access
- 0xc0040406 returned from the WriteItemValue method (OPC_E_NOTSUPPORTED)