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.
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.
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:
-
Log in to the host running the Node with administrator privileges.
-
Start the Windows Services Manager.
-
Find the AspenTech Inmation Node Service and, in the context menu, open the Properties.
-
Open the Log On tab.
-
For Log on as: select Local System account.
-
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
-
Open the System Config App in a browser and sign in by going to:
https://<hostname>:<port>/apps/webstudioThis is the url for the secure https connection to the WebServer. It is recommended to only the secure channel when connecting to the system. -
Select "System Config" from the index page and open the System Model in the Object Model panel.
-
Right-click on the "Home" Node and select from the context menu to open the Create Object dialog.
-
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).
-
Enter an Object Name for the OPC COM Server group. The Owner Path property will be set automatically on creation.
Figure 3. Create OPC COM Server Group dialog -
Click Create. The OPC COM Server Group object will be created below the Node.
-
Right-click on the newly created OPC COM Server Group and select from the context menu to open the Create Object Dialog.
-
Select "OPC COM Server" and enter an Object Name for the OPC COM Server in the Common section.
Figure 4. Create OPC Server - Common properties -
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.
-
Click Create to create the OPC COM Server object in the Server Model.
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.
-
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.
Figure 6. Matrikon OPC Explorer - Visible OPC COM ServersIf the server is not visible, you might need to refresh the view to see it. -
Select and right-click the server and select "Connect".
Figure 7. Client connected to OPC COM Server -
Once connected, click "Add Tags" to browse the I/O Model and add tags to the display.
Figure 8. Browse and add tags in client