- Posts: 43
- Thank you received: 1
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 .NET
- Reading, Writing, Subscriptions, Property Access
- Non-simple data types
Non-simple data types
For the time being I have no other issues, all the real OPC DA Servers used by us deliver data in the standard (the easiest) types, already tested and working well.
Nice weekend and thanks!
Best regards,
Emilio
Please Log in or Create an account to join the conversation.
I have to thank you very much for your fedback, and especially the difference between ReadItem and subscription which you have described. It seemed innocent at first look, but in fact it allowed me to discover a series of hidden bugs - mostly related to types conversions and especially with arrays, but also others. I have fixed them all, and the updated component and associated Bonus Pack are now available on this site (it is build 5.04.75.1).
With arrays, the proper behavior is to return .NET array of specific element type - not just array of Objects. For example, accessing "Simulation.ReadValue_ArrayOfCY" item is now giving System.Decimal[] (not System.Object[]) for both reading and via subscription. Note that this may need a change in your existing code, if you are relying on the old (incorrect) behavior.
I am also attaching the output from the enhanced ConsoleDataTypes example, showing how the various data types work.
out.txt
Please Log in or Create an account to join the conversation.
I have now changed the Simulation OPC Server so that the initial value of Register_DISPATCH is VT_DISPATCH, with a "null" interface pointer. This one actually works well even with your existing QuickOPC.NET build (and converts to "null" .NET object).
I have also added reading and displaying of Register_DISPATCH to the ConsoleDataTypes example in Bonus Pack.
Both these changes will be in builds 5.04.74.1 and later, which will be posted to this site soon, most likely during today.
support
Please Log in or Create an account to join the conversation.
I just post this for your info (it's not a problem for me): I had to convert CY and DECIMAL, and ArrayOfCY, because OPC UA Variants cannot accept these types (there is no automatic conversion). The conversion is fine now, but I've noticed "on the way" that if I Read or Subscribe the following item:
"Simulation.ReadValue_ArrayOfCY"
I get two different data types back.
By reading (ReadItem) -> {System.Object[]}
By subscribing -> {System.Decimal[]}
I implemented both conversions, to Double[], and it works fine.
Best regards,
Emilio
Please Log in or Create an account to join the conversation.
A first chance exception of type 'OpcLabs.EasyOpc.OpcException' occurred in EasyOpcDANet.dll
2/8/2011 11:18:44 AM: EXCEPTION: OPC operation failure at OpcLabs.EasyOpc.DataAccess.EasyDAClient.CheckComResult(Int32 hResult, IErrorInfo* pErrorInfo)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItem(ServerDescriptor serverDescriptor, DAItemDescriptor itemDescriptor)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItem(String machineName, String serverClass, String itemId, VarType dataType)
at OpcLabs.EasyOpc.DataAccess.EasyDAClient.ReadItem(String machineName, String serverClass, String itemId)
My call is like in the following: DAVtq vtq = OpcDaClient.ReadItem(var.MachineName, var.ServerClass, var.ItemId);
Best regarrds, Emilio
Please Log in or Create an account to join the conversation.
I must apologize for my too quick answer yesterday...I did again some test and I noticed that the three types CY, DATE and DECIMAL work fine!
If I write a complete DATE into the simulation server then I can read it correctly from my .NET client. About CY and DECIMAL, I get exception but not from the QuickOPC.NET, rather from the OPC UA Libraries, because I do not convert these types properly.
I have at the moment no further issues concerning the QuickOPC.NET, it works just fine.
Thanks for supporting, best regards,
Emilio
Please Log in or Create an account to join the conversation.
thanks for positive feedback. On my part, I would still like ot make sure that there is no problem with VT_EMPTY. Which item are you reading? Can you send the details of the exception? Are you getting exception diirectly in the ReadItem call, or in some code that is processing the result? Can you post that part of your code?
Thank you
Zbynek Zahradnik
Please Log in or Create an account to join the conversation.
I tell you only for your info, because it does not disturb me at all, that I still get exceptions when I read a VT_EMPTY item, by using the standard ReadItem().
This is anyway not a problem for me because I catch exceptions and I re-map values and qualities according to our rules, but maybe it's useful info for you.
Thanks a lot and best regards,
Emilio
Please Log in or Create an account to join the conversation.
Thank you and best regards,
Emilio
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-Classic in .NET
- Reading, Writing, Subscriptions, Property Access
- Non-simple data types