Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Remote OPC Server on Windows 95/98/Me

1 ratings | 5.00 out of 5
Print

Overview

Before starting with the configuration, there are a few important notes:

Note 1: In order to run remote OPC, both machines have to be logged on to the same NT domain. In other words, remote OPC assumes an NT server on your network that defines an NT domain. We recommend using the same user account for both machines for troubleshooting.

Note 2: There is not a significant difference between running Windows 9x/Me and NT/2000 on the client computer. However, there is a significant difference on the server side. While OPC servers on NT/2000 machines can be launched remotely by the (first) client, Windows 9x/Me does not have this capability. The server must already be running before the remote client tries to connect. The real complication is the fact that the OPC servers cannot be launched manually in most cases. So, how do you start such a server if you cannot do it either manually or remotely? You have to start it from a local client. Once it is launched, you can connect from a remote machine. For this reason we recommend that you use NT or 2000 on the server side.

There are two ways in which you can access a remote OPC server:

1. Access the remote OPC server directly from the client machine
In this case the OPC client directly, specifically asks DCOM to launch the OPC server on a remote machine. The two parameter that the client passes to DCOM are the remote machine name and the OPC server ID.

2. Redirect a local OPC server (on the client machine) to the remote OPC server
In this case the client asks DCOM to launch the local OPC server. However, DCOM is commanded (in its configuration) to launch the server on a remote computer. This procedure is transparent for the client.


1. Accessing the Remote OPC Server Directly

The advantage of this method is that you do not need the OPC server application installed on the client computer.

Server Computer (Windows 9x/Me):
  1. Configure DCOM settings. Follow all the steps in the following document: General DCOM Configurations for 95/98/Me
  2. Select Start>>Run and enter dcomcnfg.
  3. Go to the Default Properties tab. Make sure the Enable Distributed COM on this computer is checked. Use the following combinations of Authentication and Impersonation options depending on the level of security that you desire:
    (None) + Impersonate(no security checking)
    Connect + Identify (verification only on the initial connection)
    For Windows 95 choose (None + Impersonate)
    (For a better understanding of these different options, use the Help button located on the top right corner of the dcomcnfg window).
  4. Click the Apply button to save these changes.
  5. Go to Default Security tab and check Enable remote connection. You must also make sure that the user who will log on to the client computer has all the necessary permissions. Click on Edit Default and grant the specific user the default access permissions. Then return to the DCOM configuration window.
    Note 1: If you choose The World for the default permissions, a minimal level of security is provided and the remote OPC server will be accessible to all users on your network.
    Note 2: Because Default Security applies to all applications, the user gains control over all of them. If you want to grant the user permission for a specific application only, don't modify the Default Security. Instead, use the application level security discussed in the next step.
  6. Click the Apply button to save these changes, and don't reboot.
  7. In the above steps you have specified default settings for all applications. Now, go to the Applications tab. Select the remote OPC server which you wish to launch. Click on the Properties button:
    a) On the Location tab select Run application on this computer.
    b) On the Security tab check Use default access permissions. Select Custom access permissions only if you want to set specific permission options for the particular application you have chosen (see Note 2 above).
    c) Click the Apply button to administer these changes. Then click OK.
  8. Click the OK button to close the dcomcnfg.
  9. Reboot your computer so that the new DCOM settings take effect.
  10. Launch the OPC server. The OPC server must be running before a client can connect to it! See Note 2 in the Overview above.



On Client Computer

Windows NT/2000:
  1. Select Start>>Run and enter dcomcnfg.
  2. Go to the Default Properties tab and make sure Enable distributed COM on this computer is checked. Click the Apply button. Click the OK button.
  3. Reboot your computer to administer the changes.


Windows 9x/Me:
  1. Do steps 2, 3, and 4 in the following document: General DCOM Configurations for 95/98/Me
  2. Select Start>>Run and enter dcomcnfg.
  3. Go to the Default Properties tab and make sure Enable distributed COM on this computer is checked. Click the Apply button. Click the OK button.
  4. Reboot your computer to administer the changes, if any.


Both computers are ready to establish a remote OPC communication. The OPC client has to ask DCOM to launch the server on the remote computer. Refer to the following documents for instructions about how to access the OPC server from these respective client packages:

Accessing Remote OPC Server Using DataSocket
Accessing Remote OPC Server Using the LabVIEW DSC Module
Accessing Remote OPC Server Using Lookout

2. Redirecting a Local OPC Server to the Remote OPC Server


This method requires the OPC server application to be installed on the client computer. The server configuration is same as above, but the client configuration differs.

Server computer (Windows 9x/Me)
Follow the steps in the Accessing the remote OPC server directly/Server computer (Windows 9x/Me) section above.

Client Computer

Windows NT/2000:
  1. Select Start>>Run and enter dcomcnfg.
  2. Go to the Default Properties tab and make sure Enable distributed COM on this computer is checked.
  3. Go to the Applications tab and select the OPC server you wish to launch. Click the Properties button.
  4. Select the Location tab. Check Run application on the following computer and enter the computer name that contains the remote OPC server. Click the Apply button and then the OK button, twice.
  5. Reboot your computer to administer the changes.

Windows 9x/ME:
  1. Follow steps 2, 3, and 4 in the following document: General DCOM Configurations for 95/98/Me
  2. Select Start>>Run and enter dcomcnfg.
  3. Go to the Default Properties tab and make sure Enable distributed COM on this computer is checked. Click the Apply button. Click the OK button.
  4. Go to the Applications tab and select the OPC server you wish to launch. Click the Properties button.
  5. Select the Location tab. Check Run application on the following computer and enter the computer name that contains the remote OPC server. Click the Apply button and then the OK button, twice.
  6. Reboot your computer to administer the changes.

Now, both computers are ready to establish a remote OPC communication. Refer to the following documents for instructions about how to access the OPC server from these respective client packages:

Accessing Remote OPC Server Using DataSocket
Accessing Remote OPC Server Using the LabVIEW DSC Module
Accessing Remote OPC Server Using Lookout
1 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).