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.

Crash on easyUAClient.ReadValue()

More
25 Aug 2021 09:07 #10139 by support
The reason for the error is that the node Id is unknown to the server, as the message says.

The reason you code does not catch the exception is that for OPC UA, you need to catch UAException and not OpcException.

Best regards
The following user(s) said Thank You: micham

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

More
25 Aug 2021 08:42 #10137 by micham
Hi,

I am facing a crash on easyUAClient.ReadValue(). See the code below. My code is unable to catch the crash. See the attached screen capture. The bolded line is crashing. See the attached screen captures. The OPC server is ProSys UA.
Can you please check what is the reason for the crash?

Thank you.

Michael

Try
If UA_Security_Annonymous Then ' Jul-18-2021
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 OpcException

The crash details are:
OpcLabs.EasyOpc.UA.OperationModel.UAException
HResult=0x80131600
Message=An OPC-UA operation failure with error ID 'Opc.UA.StatusCode=0x80340000' occurred, originating from '' and with depth of 1. The inner exception, of type "OpcLabs.EasyOpc.UA.UAStatusCodeException", contains details about the problem.
Source=OpcLabs.EasyOpcUA
StackTrace:
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAReadArguments readArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.ReadValue(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, UAAttributeId attributeId)
at EBO_Browse.Form1.GlobalTagBrowse_UA(String MyServerURL, String MyServerName, String MyGroup) in D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(1)\Form1.vb:line 306
at EBO_Browse.Form1.AddOPCItemsToolStripMenuItem_Click(Object sender, EventArgs e) in D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(1)\Form1.vb:line 958
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at EBO_Browse.My.MyApplication.Main(String[] Args) in :line 81

Inner Exception 1:
UAStatusCodeException: Status is not good: {BadNodeIdUnknown}. The node id refers to a node that does not exist in the server address space.
+ The node descriptor used was: NodeId="nsu=urn:DEV2017:OPCUA:SimulationServer ;ns=1;g=de16a2ac-efd5-452c-aca7-bc2b8ff0ead8".
+ The client method called (or event/callback invoked) was 'ReadMultiple'.
Attachments:

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

Moderators: support
Time to create page: 0.050 seconds