- Posts: 152
- Thank you received: 0
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-UA in COM
- Discovery, Browsing, Browse Dialogs and Controls
- 2017.1 Browse doesn t works anymore in delphi
2017.1 Browse doesn t works anymore in delphi
THANK YOU!!!
Please Log in or Create an account to join the conversation.
var ReferencesNodeId: _UANodeId;
...
ReferencesNodeId := CoUANodeId.Create;
ReferencesNodeId.StandardName := 'References';
BrowseParameters.ReferenceTypeIds.Add(ReferencesNodeId);
Please Log in or Create an account to join the conversation.
var
BrowseParameters: _UABrowseParameters;
BrowsePathParser: _UABrowsePathParser;
Client: TEasyUAClient;
Count: Cardinal;
Element: OleVariant;
EndpointDescriptor: _UAEndpointDescriptor;
NodeDescriptor: _UANodeDescriptor;
NodeElement: _UANodeElement;
NodeElementEnumerator: IEnumVariant;
NodeElements: _UANodeElementCollection;
begin
EndpointDescriptor := CoUAEndpointDescriptor.Create;
EndpointDescriptor.UrlString := 'opc.tcp://127.0.0.1:49320/'
NodeDescriptor := CoUANodeDescriptor.Create;
NodeDescriptor.NodeId.StandardName := 'Objects';
BrowseParameters := CoUABrowseParameters.Create;
BrowseParameters.NodeClasses := UANodeClass_Object;
BrowseParameters.ReferenceTypeIds.Add(NodeDescriptor.NodeId);
NodeElements := Client.BrowseNodes(
EndpointDescriptor,
NodeDescriptor,
BrowseParameters);
NodeElementEnumerator := NodeElements.GetEnumerator;
while (NodeElementEnumerator.Next(1, Element, Count) = S_OK) do
begin
NodeElement := IUnknown(Element) as _UANodeElement;
if Assigned(NodeElement) then
Showmessage(NodeElement.BrowseName.ToString);
end;
Please Log in or Create an account to join the conversation.
I don t understand how to do it.
I have add:
BrowseParameters.ReferenceTypeIds.Add(nodedescriptor);
In my example(above) but doesn t work
Thanks,Alessandro
Please Log in or Create an account to join the conversation.
Earlier, it used to contain a collection with a single element, UAReferenceTypeIds.References. Now it is empty, and the developer needs to specify the desired reference types explicitly.
This should be doable e.g. by creating a UANodeId object, assigning "References" string to its StandardName property, and then calling Add on the UABrowseParameters.ReferenceTypeIds, with that node as an argument.
Best regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I have used in 2016.2 to retrieve root node and work well but after update last version doesn t work anymore in Delphi.
My function is:
var
BrowseParameters: _UABrowseParameters;
BrowsePathParser: _UABrowsePathParser;
Client: TEasyUAClient;
Count: Cardinal;
Element: OleVariant;
EndpointDescriptor: _UAEndpointDescriptor;
NodeDescriptor: _UANodeDescriptor;
NodeElement: _UANodeElement;
NodeElementEnumerator: IEnumVariant;
NodeElements: _UANodeElementCollection;
begin
EndpointDescriptor := CoUAEndpointDescriptor.Create;
EndpointDescriptor.UrlString := 'opc.tcp://127.0.0.1:49320/'
NodeDescriptor := CoUANodeDescriptor.Create;
NodeDescriptor.NodeId.StandardName := 'Objects';
BrowseParameters := CoUABrowseParameters.Create;
BrowseParameters.NodeClasses := UANodeClass_Object;
NodeElements := Client.BrowseNodes(
EndpointDescriptor,
NodeDescriptor,
BrowseParameters);
NodeElementEnumerator := NodeElements.GetEnumerator;
while (NodeElementEnumerator.Next(1, Element, Count) = S_OK) do
begin
NodeElement := IUnknown(Element) as _UANodeElement;
if Assigned(NodeElement) then
Showmessage(NodeElement.BrowseName.ToString);
end;
Please Log in or Create an account to join the conversation.
- Forum
- Discussions
- QuickOPC-UA in COM
- Discovery, Browsing, Browse Dialogs and Controls
- 2017.1 Browse doesn t works anymore in delphi