1 / 12

Configuring and Running the OPC .NET Generic Clients

Configuring and Running the OPC .NET Generic Clients. Generic Client Software. Client Interface. Server Interface. Standard code for OPC Wrappers. Generic Client. Client Base. OPC COM Server. Server Base. OPC Wrapper. WCF. Class API. Class API Client. Alternate Server

caleb-mays
Download Presentation

Configuring and Running the OPC .NET Generic Clients

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 Generic Clients

  2. Generic Client Software Client Interface Server Interface Standard code for OPC Wrappers Generic Client Client Base OPC COM Server Server Base OPC Wrapper WCF Class API Class API Client Alternate Server Implementation Adhoc Client Ad- hoc API Standard code for the server Developer-specific code Extended Client Interfaces Standard code for the client

  3. Generic Client Applications • Xi Client GenericApp • Wraps only one server of each type • Wrapped OPC Classic servers can be local or remote to the Wrapper • Multiple Wrappers can exist on the same PC at the same time • Wrappers are located by their URL

  4. Wrapper Server Projects • Expand the projects: • GenericApp AdhocApi • GenericApp ClassApi • GenericApp

  5. Client App.Config Files Open the App.Config files (they are identical):

  6. Set the Url of the Default Server <appSettings> <!--TODO: Use this key to set the URL of the default Xi Server.--> <addkey="XiServerUrl“ value="http://localhost:60080/XiServices/serverDiscovery"/> • This key is used to identify the default OPC .NET server for the client application: • GenericApp – this URL will be the first URL in the list of URLs • GenericApp AdhocApi and ClassApi – these client applications will automatically attempt to connect to the default server

  7. Set the Server Info <appSettings> <!—Set the name of your company and the name of your server--> <addkey="Vendor" value="My Company Name"/> <addkey="Server" value="My Server Name"/> <!—Add site specific info (e.g. location of the server). This info is used only for display purposes--> <addkey="UserInfo" value="Deployment Specific Info"/>

  8. Set the System Name <appSettings> … <!--If the server provides access to a single system only, add this key and the name of the system. Otherwise, comment out this entry. The system is the underlying system to which the native Xi server or the wrapped OPC COM server provides access. The system name is used by clients to differentiate Xi InstanceIds obtained from multiple Xi Servers. The system name will be embedded in the InstanceIds of this server.--> <addkey="System" value="This System Name"/>

  9. Set the ProgIds of the wrapped OPC Classic servers <appSettings> … <!--The following keys contain the ProgIds for the wrapped servers--> <addkey="OPCDA" value="OPC DA ProgId"/> <addkey="OPCAE" value="OPC AE ProgId"/> <addkey="OPCHDA" value="OPC HDA ProgId"/>

  10. Set the MachineName of the wrapped OPC Classic servers <appSettings> … <!--The following keys contain the Machine Names/IP Addresses for the wrapped servers. Leave them commented out if they are on the same machine as the Wrapper--> <!--<add key="OPCDAHOST" value =“MachineName"/>--> <!--<add key="OPCAEHOST" value =“MachineName"/>--> <!--<add key="OPCHDAHOST" value =" MachineName "/>-->

  11. Set the Base Addresses <system.serviceModel> … <host> <baseAddresses> <!--Change the default “XiServices” and the Port Numbers (60080 and 60081) in the following three lines to your own values only if multiple OPC .NET 3.0 servers will be on the same machine--> <addbaseAddress="net.pipe://localhost/XiServices" /> <addbaseAddress="http://localhost:60080/XiServices" /> <addbaseAddress="net.tcp://localhost:60081/XiServices" />

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

More Related