Professional OPC
Development Tools

logos

Delphi

More
17 Jan 2017 19:52 #4779 by support
Replied by support on topic Delphi
I think you are going in circles. I have earlier explained that the dialog does not support that - quoting:

The dialog currently does not allow you to pass in two or more "favorite" server URLs, which is what I understand may be what you are looking for. If this is the case, and asking the user to manually enter the URL is not an options, I suggest that you design your application in such a way that the user somehow picks the server first in some other form of your app, and then the UADataDialog is shown to him, with the nodes from the server only.


For any endpoint/nodes passed into the dialog, using EndpointDescriptor and NodeDescriptor (NodeDescriptors in MultiSelect) properties, the corresponding endpoint node (a single node, though) will be displayed in the dialog.

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

More
17 Jan 2017 12:30 #4774 by alr1976
Replied by alr1976 on topic Delphi
Ok so i can insert hosts by code?In Delphi?how?

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

More
17 Jan 2017 10:10 #4769 by support
Replied by support on topic Delphi
I am sorry but this is a misunderstanding of what the dialog (or its design) is supposed to do.

You do not design the properties of the dialog by running the "Test", if that's what you are doing. The only things that "design" the dialog are those that can be seen in its properties (look at the Properties window), but - and that is probably what confuses you - *not* those that appear under Input, Output, or Input/Output categories. All of these are ephemeral and should be passed into/taken from by the code, each time the dialog is invoked.

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

More
16 Jan 2017 20:30 #4766 by alr1976
Replied by alr1976 on topic Delphi
Bug is in design mode...
In design mode create hosts after close project and reopen it. Hosts disappear

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

More
16 Jan 2017 20:08 #4765 by support
Replied by support on topic Delphi
I understand what you want to achieve, but the behavior is by design. There is no "storage" for stuff that the user does inside the dialog, besides what is available through its properties.

You can, however, store the selected data yourself, and then pass them back to the dialog. That can be just one element (when MultiSelect = false), or multiple elements (when MultiSelect = true).

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

More
16 Jan 2017 20:00 #4764 by alr1976
Replied by alr1976 on topic Delphi
Ok but there is a bug...
I use dialog with UserPickEndpoint = true
I insert 10 hosts and 10 nodes
For example:

Server1
Node1
Server2
Node2
.
.
.
Server10
Node10

If i open dialog i found my hosts and nodes but if i close project and reopen i must reinsert all hosts and nodes and this is difficult tasks. This bug happen with delphi and Visualc

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

More
16 Jan 2017 16:41 #4763 by support
Replied by support on topic Delphi
I am not 100% sure if I understand the request, but I will try to answer it in the way I understand.

The dialog documentation is here: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ml#OPC-UA%20Data%20Dialog.html .

The purpose of the dialog is to allow the user to select one data node from an OPC UA server. You can either

Have UserPickEndpoint = false, and pass a server's EndpointDescriptor from your code. In this case the user will be forced to use the server your code have chosen, and only nodes from that server will be shown. Or,

Have UserPickEndpoint = true. In this case the user will be able to freely select an OPC UA server. You can also pass in an EndpointDescriptor, and that will be become a "starting point", but the user will be able to select a different server as well. With UserPickEndpoint = true, servers on the local host, servers on the Windows network, and server on our demo site can be selected (if a an OPC UA Local Discovery Server runs on the corresponding host). In addition, the user can connect to ANY accessible server, by using the "+" icon on the toolbar, and manually entering its URL.

The dialog currently does not allow you to pass in two or more "favorite" server URLs, which is what I understand may be what you are looking for. If this is the case, and asking the user to manually enter the URL is not an options, I suggest that you design your application in such a way that the user somehow picks the server first in some other form of your app, and then the UADataDialog is shown to him, with the nodes from the server only.

Best regards

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

More
16 Jan 2017 16:13 #4762 by alr1976
Replied by alr1976 on topic Delphi
Please answer me about hosts. Post above with image

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

More
16 Jan 2017 15:42 #4761 by support
Replied by support on topic Delphi
We do not have examples for other versions of Delphi.

In principle the version should not matter that much, but it may be necessary to re-import the type libraries (the process is described in the User's Guide).

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

More
16 Jan 2017 15:27 - 16 Jan 2017 16:32 #4760 by alr1976
Replied by alr1976 on topic Delphi
Ok i have dialogs with this code:
var
  DataDialog: TUADataDialog;
begin
  // Instantiate the dialog object
  DataDialog := TUADataDialog.Create(nil);
  //DataDialog.SetEndpointDescriptors(null);
  DataDialog.EndpointDescriptor.UrlString := 'opc.tcp://102.16.92.181:9320';
 // DataDialog.
//  showmessage(DataDialog.EndpointDescriptor.ToString);
  DataDialog.UserPickEndpoint := True;
  if (DataDialog.ShowDialog(nil) = DialogResult_OK) then
   begin
    endpoint.text := DataDialog.EndpointDescriptor.ToString;
    variable.text := DataDialog.NodeElement.ToUANodeDescriptor.NodeId.ToString;
   end;
But in My host list i have:
  • opc.tcp://102.16.92.181
  • AnyHost
  • Local Host
  • Network
  • opcua.demo-this.com
I need to have:
  • My Server (With Node opc.tcp://127.0.0.1:9320)
  • Remote Server (With Node opc.tcp://102.16.92.181:9320)
It is possible to do? and How?
Attachments:
Last edit: 16 Jan 2017 16:32 by support. Reason: formatting

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

Moderators: support
Time to create page: 0.400 seconds

      

 Recommend this on Google