I´m really new in OPC.
I want to read a Value from Server with this code:
nodeToRead.create(1);
UaNodeId node(UaString("::Yasakawa_IM:YASAKAWA_MH5S.Engineering.General.Workspace"), 6);
node.copyTo(&nodeToRead[0].NodeId);
nodeToRead[0].AttributeId = OpcUa_Attributes_Value;
result = m_pSession->read(serviceSettings, 0, OpcUa_TimestampsToReturn_Both, nodeToRead, values, diagnosticInfos);
But everytime i run this code there´s a error called " BadNodeIdInvalid".
BadNodeIdInvalid while trying to read
Moderator: uasdkcpp
- Support Team
- Hero Member
- Posts: 3064
- Joined: 18 Mar 2011, 15:09
Re: BadNodeIdInvalid while trying to read
Hello naps,
the error code BadNodeIdInvalid indicates that the NodeId you pass in does not match any NodeId on the server.
You can easily check the NodeId using UaExpert's attribute plugin (see http://documentation.unified-automation ... tes_window).
the error code BadNodeIdInvalid indicates that the NodeId you pass in does not match any NodeId on the server.
You can easily check the NodeId using UaExpert's attribute plugin (see http://documentation.unified-automation ... tes_window).
Best regards
Unified Automation Support Team
Unified Automation Support Team