Create and Connect to the OPC COM Server

The OPC COM Server is embedded in the Node upon installation but requires that an OPC COM Server object is created under the Node in the System Model for it to be activated. Multiple OPC COM server instances can be created on a single Node with different ProgIDs and different configurations.

The AspenTech Inmation OPC Classic (COM) Server cannot be used to forward events coming from OPC UA Datasources.

Pre-requisites

Create a User Identifier

Before creating OPC COM Server instances, it is first necessary to add a User Identifier that corresponds with the Windows account on the computer you are using, underneath a Profile in the Access Model.

To do this, follow the Create a User instructions under a Profile of your choice and in the ID property, enter the user_sam_name returned when you enter the whoami /user command in powershell.

Windows User Identifier
Figure 1. Windows User Identifier

The parent Profile can be used to control the General Access Rights (for example OPC DA/HDA/A&E Connections) and Model Access Rights for the User.

Example Profile for OPC COM Users
Figure 2. Example Profile for OPC COM Users

The Security References for the Profile for in the I/O Model can be set to the desired permissions (recommended to limit to "Read", "List" and "Inheritable").

Raise the Privileges of the Node Service

By default, when a Node is installed, it is installed with restricted privileges, running on the Network Service account. For the Node’s OPC COM service to be visible to clients, its privileges need to be raised to the Local System account privileges. To do this:

  1. Log in to the host running the Node with administrator privileges.

  2. Start the Windows Services Manager.

  3. Find the AspenTech Inmation Node Service and, in the context menu, open the Properties.

  4. Open the Log On tab.

  5. For Log on as: select Local System account.

  6. Click OK

OPC COM Client

Use an external OPC Classic client (Matrikon’s OPC Explorer for example) to connect to the OPC COM Server and browse the namespace.

Creating an OPC COM Server

  1. Open the System Config App in a browser and sign in by going to:

    https://<hostname>:<port>/apps/webstudio
    This is the url for the secure https connection to the WebServer. It is recommended to only the secure channel when connecting to the system.
  2. Select "System Config" from the index page and open the System Model in the Object Model panel.

  3. Right-click on the "Home" Node and select Admin  New from the context menu to open the Create Object dialog.

  4. Expand the Services section in the left-hand panel and select "OPC COM Servers" (this is a group object for all OPC COM Server objects).

  5. Enter an Object Name for the OPC COM Server group. The Owner Path property will be set automatically on creation.

    Create OPC COM Server Group dialog
    Figure 3. Create OPC COM Server Group dialog
  6. Click Create. The OPC COM Server Group object will be created below the Node.

  7. Right-click on the newly created OPC COM Server Group and select Admin  New from the context menu to open the Create Object Dialog.

  8. Select "OPC COM Server" and enter an Object Name for the OPC COM Server in the Common section.

    Create OPC Server - Common properties
    Figure 4. Create OPC Server - Common properties
  9. In the left-hand panel, open the COM Settings section and enter a Version Independent ProgID (this is the name that will be displayed in the client when connecting). If creating more OPC COM server instances, the ProgIDs should be different.

    Create OPC Server - COM Settings
  10. Click Create to create the OPC COM Server object in the Server Model.

    System Model - OPC COM Server Object
    Figure 5. System Model - OPC COM Server Object

Connecting to OPC COM Create OPC Create OPC Server

To demonstrate creating a connection to the OPC Server, we will use Matrikon OPC Explorer as the OPC COM client.

  1. Open Matrikon OPC Explorer and look for the created OPC COM server under the localhost, it will have the same name as the Version Independent ProgID entered earlier.

    Matrikon OPC Explorer - Visible OPC COM Servers
    Figure 6. Matrikon OPC Explorer - Visible OPC COM Servers
    If the server is not visible, you might need to refresh the view to see it.
  2. Select and right-click the server and select "Connect".

    Client connected to OPC COM Server
    Figure 7. Client connected to OPC COM Server
  3. Once connected, click "Add Tags" to browse the I/O Model and add tags to the display.

    Browse and add tags in client
    Figure 8. Browse and add tags in client