Step 1.2.2.2. Ptopc_config.xml File: Project Definitions

Lines in the ptopc_config.xml file that define individual projects are as follows.

The number of lines in the list of projects depends on your system requirements.

This sample ptopc_config.xml file lists three projects. Each project includes the required lines and zero or more additional lines.

Note: If optional lines are not added and there is a default value, the default value will be used.

Code Snippet from Sample File

 

...

 

4

<ATLSIM>

5

 

<ptcom_prog_id>PtComOpc</ptcom_prog_id>

6

 

<opc_prog_id>NDI.OPCATLSimSvr.1</opc_prog_id>

7

 

<opc_server_node_name>NodeName.1</opc_server_node_name>

8

 

<dcom_timeout>10000</dcom_timeout>

9

 

<dcom_threshold>20000</dcom_threshold>

1

 

<ping_interval>15000</ping_interval>

11

 

<reconnect_interval>15000</reconnect_interval>

12

 

<hang_protection_timeout>120000</hang_protection_timeout>

13

</ATLSIM>

 

<CIMPOPC>

 

 

<ptcom_prog_id>PtComOpc</ptcom_prog_id>

 

 

<opc_prog_id>NDI.OPCATLSimSvr.1</opc_prog_id>

 

</CIMPOPC>

 

<KEPLOCAL>

 

 

<ptcom_prog_id>PtComOpc</ptcom_prog_id>

 

 

<opc_prog_id>NDI.OPCATLSimSvr.1</opc_prog_id>

 

 

<opc_server_node_name>NODE3< /opc_server_node_name>

 

</KEPLOCAL>

 

...

Snippet Line Description

4

<project name>

 

(Required)

 

<Project name>/</Project name> identify the section that defines specifications for an individual pseudo-project.

At least one pseudo-project is required, as follows.

For each OPC Server.

For each node that an OPC Server is on, if the OPC Server is on more than one node.

Note: You can create two pseudo-projects that point to the same OPC Server on the same node. However, this is not necessary.

A name that is assigned to a pseudo-project.

Must not have the same name as any standard CIMPLICITY server projects, either locally or anywhere on the network.

Name is limited to the same length as a standard CIMPLICITY server project name.

Has a name length that is the

The pseudo-project includes a number of point ID's does not have to exist as a CIMPLICITY project.

Each OPC Server can have more than one pseudo-project.

If the OPC Server is running on more than one node, there must be a pseudo-project for each node.

5

<ptcom_prog_id>PtComOpc</ptcom_prog_id>

 

(Required)

 

Identifies the program ID.

Important: PTComOpc must be the PtCom program ID.

6

<opc_prog_id>NDI.OPCATLSimSvr.1</opc_prog_id>

 

(Required)

 

Program ID in the registry that identifies the OPC server to be used.

This is the same Program ID used by the OPC client communications device in the Network Address field of an OPC device.

Example

NDI.OPCATLSimSvr.1

7

<opc_server_node_name>NodeName.1</opc_server_node_name>

 

(Optional)

 

Node Name is an off-node OPC Server node name.

The entry identifies the node where the OPC server resides. It can be a DNS (WINS) resolvable node name or an IP address.

If you do not specify a node name, the local node is assumed.

Example

NodeName.1

8

<dcom_timeout>10000</dcom_timeout>

 

(Optional)

 

The amount of time the client must wait for a valid connection to the OPC server.

When any action is performed that involves the OPC server, those actions happen on a separate thread.

The main thread will wait the DCOM timeout for the other thread to complete the call to the OPC server.

If the separate (worker or pool) thread does not return in that amount of time, the main thread is allowed to continue (with an error noted).

9

<dcom_threshold>20000</dcom_threshold>

 

(Optional)

 

How long the OPC Client waits to abort the connection to the OPC server after

detecting that the server has not responded to a ping.

Enter the DCOM timeout threshold in milliseconds (ms).

Default: 20000 (milliseconds)

10

<ping_interval>15000</ping_interval>

 

(Optional)

 

How often the OPC client pings the OPC server in milliseconds.

Default: 15000 (milliseconds)

11

<reconnect_interval>15000</reconnect_interval>

 

(Optional)

 

Time between reconnection attempts (i.e. RestartDelay).

This time does not include the time it takes Microsoft's COM (DCOM) engine to determine if it is able to launch the OPC server application.

Default: 15000 (milliseconds)

12

<hang_protection_timeout>120000</hang_protection_timeout>

 

(Optional)

 

Time before the Advanced Viewer times out. An error is written to the core log reporting that the OPC Server appears to be hung.

Default: 120000 (milliseconds)

13

</project name>

 

(Required)

<Project name>/</Project name> identify the section that defines specifications for an individual pseudo-project.

</project name> is the end of specifications for the selected project.

More information

Step 1.2.2. Enter Advanced Viewer specifications in the ptopc_config.xml file.