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.

Error getting the item's data type when browsing OPC DA server (iFix)

More
09 Feb 2022 12:17 #10596 by micham
Hi,

Thank you for your answer. It is OPC DA. Excuse me for my mistake. See the code for OPC DA.

Dim varType As VarType
szArrayLen = ""
szType = ""
ItemRemoved = False ' Aug-18-2021
Try
varType = easyDAClient.GetDataTypePropertyValue("", server_properties.RealServerName, values(i).ItemId)
Catch opcException As OpcException
MsgBox("Error getting OPC-DA Item Data-Type(" + values(i).ItemId + ")!" + vbCrLf + "OPC Server exception: " + vbCrLf + opcException.Message + vbCrLf + opcException.InnerException.Message, vbOKOnly + vbExclamation, "Error")
Exit For
End Try

Thank you.

Michael

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

More
09 Feb 2022 08:35 #10595 by support
Hello.

Regarding "I assume you meant to write "This error comes from getting OPC UA item "properties" and not "DA properties". Correct?":
No. I meant OPC DA properties.

Before we get to the actual error, we need to straighten this out. There is a total confusion about whether we are dealing with OPC DA, or OPC UA.

Facts that indicate OPC DA:
- You have posted your issue under "QuickOPC-Classic in .NET" forum category.
- You have mentioned "iFix OPC DA Server".
- On the pictures provided, one can see that the selected item in the tree is "OPC Data Access 2.0...", and it is followed by something that looks like OPC DA server's ProgId (Intellution.OPCiFix....).

Facts that indicate OPC UA:
- The piece of code you provided is for OPC UA (uses EasyUAClient and catches UAException).
- In the last reply you seem to think that it is "possible" this is an OPC UA think.

I actually think that we are dealing with OPC DA only, and the only thing that is incorrect (and has to do with OPC UA) is the piece of code you have posted. But I need an to know from you whether that's right, or if there is another explanation that can rectify the otherwise contradictory facts laid out above.

Regards

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

More
08 Feb 2022 18:34 #10594 by micham
Hi,

Thank you for your answer. I assume you meant to write "This error comes from getting OPC UA item "properties" and not "DA properties". Correct?

Due to this error/exception the customer cannot add OPC items. He can add items using Matrikon OPC Explorer.

Do you think it is an OPC UA server error?

Thank you.

Michael

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

More
08 Feb 2022 15:49 #10593 by support
Hello, thank you for more information.

I am sure that the error message does not come from the piece of code you have provided. The code provided is for OPC UA: It uses EasyUAClient, and it catches UAException (even though the variable for the exception object is named opcException).

But anyway, it looks like that you have captured the right information, after making the code change.

This error comes from getting OPC DA item "properties" . Is the customer capable of doing some other operations on the same server?

Regards

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

More
07 Feb 2022 09:29 #10586 by micham
Hi,

We have implemented the inner exception details. See the attached screen capture.

Is it enough information?

Thank you.

Michael
Attachments:

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

More
04 Feb 2022 16:19 #10585 by support
Hello.

Your MsgBox is showing that there is some problem, but is hiding all the information about it. It's then nearly to impossible to investigate further.

You need to show at least opcException.Message, even better opcException.InnerException.Message.

Regards

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

More
04 Feb 2022 16:15 #10584 by micham
Hi,

One of our customers is getting an error message (see attached) when browsing for items from the iFix OPC DA server.

See our code below.

Try
If UA_Security_Annonymous Then
ValueResult = easyUAClient.ReadValue(MyServerURL, values(i).NodeId.ExpandedText, UAAttributeId.DataType)
Else
ValueResult = easyUAClient.ReadValue(gdsEndpointDescriptor, values(i).NodeId.ExpandedText, UAAttributeId.DataType)
End If
Catch opcException As UAException ' was OPCException Aug-25-2021 V1.085
MsgBox("Error getting Item Data-Type(" + nodeId + ")!", vbOKOnly + vbExclamation, "Error")
Exit For
End Try

P.S: when browsing with Matrikon Explorer, there is no error message.


Thank you.

Michael
Attachments:

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

Moderators: support
Time to create page: 0.069 seconds