html5-img
1 / 11

Configuring and Running the OPC .NET Discovery Server

Configuring and Running the OPC .NET Discovery Server. Discovery Server Overview. Finds Xi Servers cyclically using PNRP and/or a Manual Configuration File Location and name of the Manual Configuration File are configured in the app.config file of the Discovery Server

chika
Télécharger la présentation

Configuring and Running the OPC .NET Discovery Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Configuring and Running the OPC .NET Discovery Server

  2. Discovery Server Overview • Finds Xi Servers cyclically using PNRP and/or a Manual Configuration File • Location and name of the Manual Configuration File are configured in the app.config file of the Discovery Server • Accesses Xi Servers that it finds and retrieves their ServerEntry • ServerEntry contains the ServerDescription and Binding information not contained in the WSDL • Provides a method called by Xi Clients to obtain the list of ServerEntries

  3. Discovery Server Software Standard code for Discovery Servers Client Interface Server Interface Server Base Discovery Server Client Base WCF Client App OPC COM Server OPC Wrapper Alternate Server Implementation Developer-specific code Standard code for the client Standard code for all servers Developer-specific code

  4. Discovery Server Projects • Open either project: • Console Application • Windows Service

  5. Discovery Server App.Config Open and edit both App.Config files (they are identical)

  6. <appSettings> <appSettings> <addkey="Vendor" value="MyCompany"/> <addkey="Server" value="Xi Server Discovery Server"/> <!--The next two entries are used to define the path to the manual configuration file that contains a list of IP Addresses/Port Numbers of Xi Servers.--> <!--Note that the path may contain Windows environment variables enclosed in '%'.--> <addkey="ServerAddressFilePath" value ="%ALLUSERSPROFILE%\OPC Xi\"/> <addkey="ServerAddressFileName" value="XiServerAddresses.txt"/> </appSettings> . .

  7. Set the Manual Config File Path • Set the value of this key to the path to your manual configuration file if you don’t like the default <addkey="ServerAddressFilePath" value ="%ALLUSERSPROFILE%\OPC Xi\"/> ALLUSERSPROFILE is a built-in Windows environment variable. The DOS “SET” cmd will provide its value.

  8. Set the Manual Config File Name • Set the value of this key to the name of your manual configuration file if you don’t want to use this one. • <addkey="ServerAddressFileName" • value="XiServerAddresses.txt"/> • Note: You might have multiple Manual Config Files from which to select before you start your Discovery server.

  9. Running the Console App • Build the Discovery Server ConsoleApp project • The App.config file will be compiled and copied to the bin directory with the executable • Run the Discovery Server ConsoleAppusing the debugger, or run the executable from either: • Xi Projects\x86\Debug\bin • Xi Projects\x86\Release\bin

  10. Installing the Windows Service • Build the Discovery Server WinService project • The App.config file will be compiled and copied to the bin directory with the executable • Install the Discovery Server WinService by opening a DOS Command window and typing the executable name followed by /Install • See Main() in XiDiscoveryWinSvrProgram.cs for more options • In Control Panel/Administrative Tools/Services set the Properties for the Xi Discovery Server service as desired (e.g. the Logon account/password)

  11. Running the Windows Service • Run the Discovery Server using: • Control Panel/Administrative Tools/Services • Start the Xi Discovery Service • If using a debug build, debug by attaching the Debugger to the Discovery Server process

More Related