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
|
... |
|
---|---|---|
<ATLSIM> |
||
|
<ptcom_prog_id>PtComOpc</ptcom_prog_id> |
|
|
<opc_prog_id>NDI.OPCATLSimSvr.1</opc_prog_id> |
|
|
<opc_server_node_name>NodeName.1</opc_server_node_name> |
|
|
<dcom_timeout>10000</dcom_timeout> |
|
|
<dcom_threshold>20000</dcom_threshold> |
|
|
<ping_interval>15000</ping_interval> |
|
|
<reconnect_interval>15000</reconnect_interval> |
|
|
<hang_protection_timeout>120000</hang_protection_timeout> |
|
</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) |
|
Note: You can create two pseudo-projects that point to the same OPC Server on the same node. However, this is not necessary.
|
5 |
<ptcom_prog_id>PtComOpc</ptcom_prog_id> |
|
(Required) |
|
Identifies the 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)
|
Step 1.2.2. Enter Advanced Viewer specifications in the ptopc_config.xml file. |