dOPC Client Toolkit Help file
TdOPCSvr.ServerName Property
C++
__published: __property AnsiString ServerName;
C#
String ServerName;
Visual Basic
Property ServerName() As String

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

Two types of names are possible: 

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.

COM:

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

 

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

 

XML:

var
  Server : TdOPCServer;
begin
  Server := TdOPCServer.Create(nil);
  Server.ServerName := 'http://localhost/opxmlda/Matrikon.OPC.Simulation.1';
  Server.Active := true;
end;
What do you think about this topic? Send feedback!
Copyright © 2001-2014 Kassl GmbH (http://www.kassl.de). All rights reserved.