Professional OPC
Development Tools

logos

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.

Xml demo application: OPC NET API failure result "E_BADTYPE"

More
27 Jun 2016 17:54 #4177 by goosvanbeek
Thanks for your quick reply.

Indeed, using the specific data type in the demo app causes no E_BADTYPE exception.I will test my production server later this week.

Regards,
Goos.

Please Log in or Create an account to join the conversation.

More
27 Jun 2016 17:48 #4175 by support
Hello.

I have tried versions 5.35 and 5.40, and they behave the same. Both report E_BADTYPE when writing from the demo app to Static/Simple Types/Int. But they do not report any error when writing to a String item.

Without actually looking in details of it, I think that that may be the reason: The demo application always writes a string to the item. That's why writing a string works. But the server may be rejecting a string value being written to a numeric item.

In COM-based OPC-DA, at least in its latest version, the servers are actually required to convert, with some simplification, "everything to everything", so they have to convert strings to numbers etc. I will have to check OPC-XML DA spec, but most likely it does not require the servers to do so. With servers that do not make such conversion, the demo app may only be able to write strings, therefore.

Can you try modifying the code of the demo app to convert the value to an integer first?

Regards
The following user(s) said Thank You: goosvanbeek

Please Log in or Create an account to join the conversation.

More
27 Jun 2016 16:49 #4173 by goosvanbeek
Hello support,

When I use the demo application (EasyOpcNetDemoXml) and try to write an item value (e.g. Static/Simple Types/Int), it causes the exception OPC NET API failure result "E_BADTYPE". Reading an item is no problem. I connect to the opcxml.demo-this.com/XmlDaSampleServer/Service.asmx server.

I'm using version 5.40.251.1, tested on a W7 and W10 pc.

Connecting to my production server (KUKA.OPC Server 4.1) has the same effect; reading no problem, writing causes an exception.

I used version 5.35 (demo version) before, which had no issues on writing items. It seems that this issue occurred after upgrading to a newer version (5.40 licensed).

Do you have any suggestions?

Regards,
Goos van Beek

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.056 seconds