dOPC Client Toolkit
Close
dOPCComn.TdOPCClient.ServerName

ServerName contains the name of the OPC DA server the client wants to connect with.

property ServerName: string;
__property AnsiString ServerName;

3 types of OPC specification are possible: 

For UA servers: 

Enter the URL location of the OPC UA server (e.g. opc.tcp://opcua.demo-this.com:51210/ua/sampleserver). 

For COM servers: 

Enter the server name (ProgId or ClassId) of the server that the client is connected to via the Connect method. 

For XML servers: 

Enter the URL location of the OPC XML DA server (e.g. http://localhost/opxmlda/Matrikon.OPC.Simulation.1). Don't forget "http://" or "https://" at the beginning to advise dOPC to use XML connections. 

 

Also possible is to define the protocol direct: e.g. OPCClient.Protocol := coUA;

UA:

var OPCClient : TdOPCDAClient; begin OPCClient := TdOPCDAClient.Create(nil); OPCClient.OPCClientName := 'opc.tcp://opcua.demo-this.com:51210/ua/sampleOPCClient'; OPCClient.Active := true; end;

 

COM:

var Server : TdOPCDAClient; begin Server := TdOPCDAClient.Create(nil); Server.ServerName := 'Matrikon.OPC.Simulation.1'; Server.Active := true; end;

 

var Server : TdOPCDAClient; begin Server := TdOPCDAClient.Create(nil); Server.ServerName := '{F8582CF2-88FB-11D0-B850-00C0F0104305}'; //CLASSID of OPC Server Server.Active := true; end;

XML:

var Server : TdOPCDAClient; begin Server := TdOPCDAClient.Create(nil); Server.ServerName := 'http://localhost/opxmlda/Matrikon.OPC.Simulation.1'; Server.Active := true; end;

TdOPCServerBrowser.GetOPCServers, Active, Connect, TdOPCDAClientItem.ServerClsId

Kassl GmbH Copyright © 2019. All rights reserved.