Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

P-CIM OPC Communication

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

P-CIM OPC Communication

User Guide

Afcon Software and Electroncis Ltd

Contents

About P-CIM OPC Communications


P-CIM station............................................................................................................ 1
Requirements ............................................................................................................... 3
Settings .........................................................................................................................3
NetBEUI Protocol Configurations
Defining NetBEUI settings for Windows 2000 .................................................. 3
Defining NetBEUI settings for XP ....................................................................... 4
DCOM Configuration Properties
DCOM Configuration Properties for Connecting to Remote OPC Servers ....... 4
From Section 2:.................................................................................................. 6
From Section 3:.................................................................................................. 7
Adding a user to a group ..........................................................................................7
OPC Browser
Workflow................................................................................................................ 10
Opening the OPC Browser ................................................................................ 11
Connecting the OPC Browser to an OPC server .............................................. 11
Connecting the OPC Browser to a remote OPC server ...................................12
OPC Browser Interface
Menu/Tool bar .................................................................................................. 14
Disconnecting/ Reconnecting/ Refreshing connections ............................... 16
Groups ............................................................................................................... 17
Items .................................................................................................................. 18
Adding an item to a group ................................................................................ 18
Adding an item manually ..................................................................................18
Removing an item from a group ...................................................................... 19
Removing an advised item used in another P-CIM module ...........................19

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

Writing a new value to an advised item .......................................................... 19


Advising multiple items 2 ....................................................................................0
Options Menu......................................................................................................... 20
Monitoring, displaying advised items ..............................................................21
Displaying item syntax ...................................................................................... 22
Configuring OPC Browser Configuration ..........................................................22
Using the OPC Browser in a P-CIM Project................................................................ 25
Creating an object and adding OPC Browser syntax ......................................25
Creating datablocks.......................................................................................... 25
Displaying a P-CIM OPC items syntax in the OPC Browser ............................26
OPC Browser Alarm Summary Messages .............................................................26
P-CIM OPC Gateway
Running the OPC Gateway ...............................................................................27
OPC Server Properties ......................................................................................28
The OPC Gateway Editor
Example Defining an OPC Item in the OPC Gateway Editor ........................30
Viewing OPC Items in a Client Interface .......................................................... 30
OPC Browser Troubleshooting ................................................................................... 32
General ................................................................................................................... 32
NO-SEK Stations .................................................................................................... 33

P-CIM 7.70 OPC Communication User Guide

II

Afcon Software and Electroncis Ltd

About P-CIM OPC Communications


OPC (OLE for Process Control) protocol is a set of interfaces that enable standardized data exchange
between automation/control applications, field devices and other types of applications.
P-CIM has two OPC modules:

OPC Browser, an OPC client that requests information from an OPC server connected to a
PLC. The OPC Browser enables bidirectional communications between P-CIM and an OPC
server.

OPC Gateway, an OPC server, that receives data from P-CIM OPC servers. Using OPC
protocol the data is translated and sent to the OPC client that sends it to external devices and
programs.

For more information about OPC technology, visit: www.OPCFoundation.org.

P-CIM station
A P-CIM station can act as both an OPC client and OPC server, or can be a client or server only. The
diagram below illustrates how a P-CIM station is both an OPC server and OPC client.

PLC

PLC OPC server


OPC

PROTOCOL

OPC client (OPC Browser)

P-CIM Servers
BasicSrv

DBSR

PfwAlarm

C A L L B A C K

PfwDrvr

TxtSrv

P R O T O C O L

P-CIM OPC Gateway


OPC

PROTOCOL

External OPC clients

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

The P-CIM OPC client (Browser) receives data from the server, whereas the P-CIM OPC server
(Gateway) sends P-CIM data to any OPC client.
In this bidirectional process, data from the PLC arrives to the OPC server.The data is translated using
OPC protocol, and sent to the OPC client (Browser). The data is then sent to P-CIM servers and using
call back protocol..
The data sent to the OPC Gateway( Gateway) where it is translated using OPC protocol and sent to
external programs.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

Requirements
Operating System

Windows 2000 Professional/Server

Windows XP Professional

Windows 2003 Server

Protocols

Net BEUI, TCP/IP

To run the OPC Browser

P-CIM version 7.50 and up

To run the OPC Gateway

P-CIM version 7.50 and up

Windows XP , 2000 & 2003 serevr are required for remote OPC server connections.

Settings
The following must be defined on the station using OPC communications:

NetBEUI protocol

DCOM

Adding Users to a group

NetBEUI Protocol Configurations


NetBEUI (Network Basic Input Output System) protocol is required for configuring a network of 20 to
200 stations without requiring a router for a different subnet mask.
NetBEUI, is an API that enhances the DOS BIOS with additional functionalities for LANS.

Defining NetBEUI settings for Windows 2000


1.

Copy the NetBEUI files from the Windows XP CD. Instructions can be found at: http://
support.microsoft.com by searching for NetBEUI and selecting How to install NetBEUI on
Windows XP.

2.

Select the following: Start/ Settings/ Control Panel/ Network/ Dialup Connections.

3.

Right click Local Area Connection and then click the Properties button.

4.

Scroll the list, select NetBEUI protocol and then click the Install button.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

5.

Select the relevant protocol and click OK to confirm.

Defining NetBEUI settings for XP


1.

Open the Network dialog box, Select the following: Start/ Settings/ Control Panel/ Network.

2.

Open the Protocol tab, and click the Add button to open the Select Network Protocol dialog box.

3.

Select the NetBEUI Protocol option and click OK.

DCOM Configuration Properties


DCOM technology can be used to transparently send/receive information between COM components
(for example, clients and servers) on the same network.

DCOM configuration is only required for accessing remote OPC servers.

DCOM configuration is not required when both the client and the server reside on the same
computer DCOM configuration is not required.

DCOM Configuration Properties for Connecting to Remote OPC Servers


1.

Select Start/ Run to open the Run dialog box.

2.

Type dcomcnfg into the Open field and click OK. The DCOM Configuration Properties dialog
box is displayed.

3.

Select: Components Services/ Computers/ My Computer/ DCOM Config.

4.

From the Components Services list, right click PfwOPCGateway to open the PfwOPCGateway
Properties dialog box.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

5.

Click the Identify tab and select the interactive user and system options.

6.

Click Apply.

7.

Click the Security tab.

8.

Select Customize.

9.

Click the Edit button to open the Launch Permission dialog box.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

From Section 1:
1.

Check the Customize option and then click the Edit button. The Registry Value Permissions
dialog box opens.

2.

Click the Add button to display the Add Users and Groups dialog box.

3.

Select the user/group that will be able to access the OPC server.

4.

From the Permissions for Administrators field, select Allow Access

5.

Click OK and OK again, to return to the Security tab.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

From Section 2:
1.

Check the Customize option from the Access Permissions option and then click the Edit
button. The Registry Value Permissions dialog box opens

2.

Select the user/group that will be able to launch the OPC server.

3.

From the Type of Access field, select Allow Access.

4.

Click OK to return to the Security tab.

From Section 3:
1.

Check the Customize option from the Configuration Permissions option and then click the
Edit button. The Registry Value Permissions dialog box opens.

2.

Select the user/group that has permission to access the OPC server.

3.

From the Type of Access field, select Full Control.

4.

Click OK to return to the Security tab.

5.

Click OK and OK again to save these definitions and to exit the Properties dialog box.

Adding a user to a group


When users are assigned to groups, they receive the groups authorization privileges.
1.

Select the following: Start/ Settings/ Control Panel/ Administrative Tools/ Computer
Management/ Local User and Groups.

2.

Double click Groups to select the groups users.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

3.

Double click a user to open the Users Properties dialog box.

4. Select a user and then click the Add button to open the Select Users or Groups dialog box.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

5.

Enter the name of the user and then click the Check Names button to add the users details
OR
Double click the name of the user and click the Add button.The users name is added to the list.

Connecting to a remote OPC gateway in a workgroup configuration


In order to connect to a remote OPC gateway in a workgroup network configuration, a peer-to-peer
connection must be established between the client and server computers. The following changes
should be made to the Local Security Policy (on Windows 2003 Server and Windows XP Service
Pack 2 only):
1. Open the Windows Control Panel and access the Administrative Tools group.
2. Double-click the Local Security Policy icon.
3. Select on the Security Options folder.
4. On the right-hand window, double-click the Network Access: Let Everyone Permissions Apply to
Anonymous Users entry.
5. Select the Enabled option and click OK to apply the new settings.

P-CIM 7.70 OPC Communication User Guide

Afcon Software and Electroncis Ltd

6. To enable sharing folders between computers in the workgroup, locate the following entry in the
Local Security Policy window: Network Access: Sharing and Security model for Local
Accounts.
7. Double-click the entry to change the current policy.
8. From the pull-down menu select the following option: Classic - local users authenticate as themselves.

P-CIM 7.70 OPC Communication User Guide

10

Afcon Software and Electroncis Ltd

OPC Browser
The OPC Browser module can be used in a P-CIM project to access process data from an OPC
server.
During runtime, the OPC Browser receives data from the PLC after it has been processed by the OPC
server software, and then the OPC Browser sends the information to the P-CIM project.
OPC technology enables the following actions:

Connection/disconnection/reconnection between the OPC Browser to more than one OPC


server both locally and remotely (as of P-CIM version 7.02).

Adding groups and adding items to groups.

Reading/ writing item values.

Monitoring advised items.

Checking advised items status.

Checking communications.

The protocol used by the PLC must match the protocol used by the OPC server.

The following diagram displays how the OPC Browser can be used in a P-CIM project.

PLC protocol
PLC

OPC protocol

P-CIM OPC Server

P-CIM OPC Browser

P-CIM callback
P-CIM project

The OPC Browser can be opened without starting up P-CIM. However, P-CIM must be
running to enable connection to the OPC Gateway server.

Workflow
The following workflow can be used for working with the OPC Browser:

P-CIM 7.70 OPC Communication User Guide

11

Afcon Software and Electroncis Ltd

Connect the OPC Browser to the OPC Server.


In the OPC Browser, create a group and define group properties.
Add items to the group.
Activate the Option menu functions.

Opening the OPC Browser

From the Tools menu of the P-CIM icons group,click the P-CIM OPC Browser icon

Connecting the OPC Browser to an OPC server


1.

Open the Connect dialog box: From the OPC Browser interface, click the Connect icon
or,
From the Server menu click the Connect option.

P-CIM 7.70 OPC Communication User Guide

12

Afcon Software and Electroncis Ltd

The OPC Server Key


field is automatically filled after
an OPC server is selected
from the list.

2.

In the Connect dialog box double click an OPC server,


or select an OPC server and then click the Connect button.

3.

The OPC Browser is connected to the OPC server and the OPC Browser interface opens.

Connecting the OPC Browser to a remote OPC server


1.

Open the Connect dialog box: In the OPC Browser interface click the Connect icon
or from the Server menu click the Connect option.

2.

Click the Network OPC Servers button and browse for the computer where the remote OPC
server is installed.

3.

Click OK to make the connection between the servers. The OPC servers available on the remote
computer are added to the list of OPC servers in the Connect dialog box, and the name of the
remote computer is added to the Network Computer field.

P-CIM 7.70 OPC Communication User Guide

13

Afcon Software and Electroncis Ltd

The computer names of


remote OPC servers have
backslashes \\ as
prefixes.

When making remote OPC server connections, check that you have the appropriate authorization.
Error! Reference source not found., page 8 for more information. Both local and remote computers
must be defined on the same domain or in the same workgroup.
4.

Select a remote OPC server and then click the Connect button to connect between the selected
OPC server and the OPC Browser.

The INI file name of the remote OPC server has the following format:
OPC_NetworkComputerName_OPCServerName.ini

OPC Browser Interface

When first accessed the OPC Browser has the following sections:

P-CIM 7.70 OPC Communication User Guide

14

Afcon Software and Electroncis Ltd

Section

Description

Menu bar

See Menu bar on page 14.

Toolbar

See Toolbar on page 14.

Address bar

Displays the full name and address of the item currently selected in the OPC
Browser.

Server window

Displays the OPC server group tree structure. When expanded the tree has
the following structure:
Server name, Group name, Sub-group name

Group window

Displays the properties of a selected OPC Browser group:


Group name, which is the name identifying the group.
Update rate, which specifies the frequency (in milliseconds) that the
OPC server sends updated data.
Percent deadband, specifiying the percent change of the scale
required before notifying the OPC Browser of the data changes. The
percent deadband is defined for the item in the OPC server
Deadband default = 0.
See Groups on page 17.

Items window

Displays the items of the selected group or sub-group in the Server window
from which items can be added into the list of advised items.

Advised items window

Displays selected items from the Items list. When monitoring is defined,
these items are scanned according to predefined conditions.

Menu/Tool bar
The OPC Browser menu bar is dynamic, after a connection has been made to an OPC server
additional menus and options are available. An asterisk * next to a menu/option indicates that it is
available both when the OPC Browser is online or offline.

Table 1: OPC Browser Menu/Tool b ar


Menu
File

Icon

Option

Description

Save

Saves the OPC Browser groups and items.

*Exit

Exits the OPC Browser module.

P-CIM 7.70 OPC Communication User Guide

15

Afcon Software and Electroncis Ltd

Table 1: OPC Browser Menu/Tool b (Continued)ar


Server

*Item

*Connect

Opens the OPC servers Connect dialog box where the


connection between the OPC Browser and a selected OPC
server are made.

Disconnect

Ends communications between the OPC Browser and the


selected OPC server.

Refresh

When clicked, the OPC Browser reads the items from the tree of
the selected OPC server again and updates the OPC Browser
window.

Reconnect

Reconnects the OPC Browser to the OPC server after


communication failure. This option is only available when
automatic reconnection is disabled in the Keep Alive dialog
box See page 23.

Disconnect all
servers

Disconnects all open servers and displays the OPC Browser


window with the basic menu bar options and toolbar Connect
icon.

Show Items

When connected to an OPC server, select this option to expend


the items tree.

Server
Properties

Shows the OPC Server properties. Server specific settings are


modified from this location.

Add group

Opens the Group Parameters dialog box. OPC Browser groups


and their properties are displayed in the Group Window of the
OPC Browser interface. See Groups on page 17.

Remove group

Removes a selected group from the Group Window.

Add item

Opens the Add Item dialog box where items that require
constant monitioring are defined.

Remove item

Removes a selected item from the Advised Items list.

Write item

Opens the Writing dialog box whereyou can modify the selected
advised items value.

Add multiple
items

Opens the Multiple Advise dialog box where you can define
batches of items that require constant monitoring.
An advised item is an item that is constantly monitored by the
P-CIM client modules. For example, Operator Worksation.

View

*Status bar

Toggles the Status bar where the total number of advised items
and the total number of items in a selected group are displayed.

Address bar

Toggles the address bar. The information in the address bar can
be copied and added to objects during project development.

P-CIM 7.70 OPC Communication User Guide

16

Afcon Software and Electroncis Ltd

Table 1: OPC Browser Menu/Tool b (Continued)ar


Options

Monitoring

When activated, displays updated values of advised items.

P-CIM item
syntax

When activated, displays the Server| Topic| defined for the item
in the OPC server Item syntax of a selected item (or advised
item) in the interfaces Address bar.

*OPC Browser
configuration

Opens the Browser Configuration dialog box where connection


settings can be defined.

When the Monitoring option is selected, data is transferred between the OPC Browser and the
OPC server. Advised items and their details are displayed in the Advised Items window. This
process requires extensive CPU memory resources. We recommend using this option only when
absolutely required.
From Version P-CIM 7.50 the OPC browser is capable of supporting EGU conversion functions:
bcd, byte, nib and alarm. To use these functions add the character d before each function. For
example: dbcd, dbyte.

Disconnecting/ Reconnecting/ Refreshing connections

Disconnecting:

Disconnecting a single OPC server :select the OPC server from the Server window and
Disconnect icon
from the toolbar click the
or from the Server menu select the Disconnect option.

Disconnect all OPC servers connected to the OPC Browser: select the Disconnect
All option from the Server menu.

Reconnecting:To reconnect to the OPC server that was last disconnected, click the
Reconnect icon from the toolbar
or from the Server menu select the Reconnect option.

Refreshing: The OPC Browser with items and their values that were added/ removed
to/ from the selected OPC server, click the
Refresh icon
or from the Server menu select the Refresh option.

An OPC server that has items that are advised (by the Operator Workstation, DBSR or other
modules), cannot be disconnected until their items become unadvised
If the OPC server has advised items and you wish to disconnect; shutdown P-CIM and then
restart the application.
All connected OPC servers are automatically disconnected when P-CIM is shutdown.

P-CIM 7.70 OPC Communication User Guide

17

Afcon Software and Electroncis Ltd

Groups
Groups with any number of items can be created where each group has global parameters specific to
the group. This option increases efficiency in a P-CIM project.
An advised item is processed in the OPC Browser, after it has been added, and results are displayed
in the Advised Items window.
A list of all OPC Browser groups is displayed in the Groups window.
Adding a new group

Groups are created/ modified in the Group dialog box. To open this dialog box either right click in the
Servers window or from the Items menu select the Add Group option.

The Group Properties dialog box has the following fields:

Field

Description

Name

Group name.

Update rate

Indicating the frequency that the group of advised items is scanned. For example, if
1000 msec is defined the group is scanned every 1000 msec.

Deadband

Specifying the required percentage of change in the scale defined for the item in the
OPC server before notifying the OPC Browser of the data changes.
Deadband default = 0.

Time Bias

Indicates the time zone where the data was collected. Time Bias indicates the time
difference between the server and the client. By default= -120

P-CIM 7.70 OPC Communication User Guide

18

Afcon Software and Electroncis Ltd


Removing groups from the Groups window

Select the group and then either right click and select Remove Group or, from the Items menu select
the Remove Group option.

The OPC Browser has a default group named Root that cannot be deleted.

Modifying group properties

Group properties are defined in the Group Properties dialog box.


To open this dialog box either, select a group and then right click and select Group Properties or,
from the Items menu select Group Properties.

Items
Items can be advised and added to groups. All items that are defined in the application are displayed in
the OPC Items window. When an item is added to a group it becomes an advised item and is displayed
in the Advised Items window.

Since the OPC Browser is used for test purposes, not all OPC items need to be added to
the Advised window.

Adding an item to a group


On first connection to the OPc server, the items tree is not visible.
2.

To display the items list, right-click the OPC Server name and choose Show Items from the
menu.

3.

In the Server window tree, select a branch and then select a group.

4.

Select an item from the OPC Items window and then right click on the item and select the Add
Item option or
From the Items menu double click on the item, select the Add Item option.

Adding an item manually


This option is used to add an item that does not appear in the OPC Items window, but is supported by
the OPC server.
1.

In the Server window tree, select a branch and then select a group.

2.

From the OPC Items List window, right click and select Add Item.The Add Item dialog box is
displayed.

P-CIM 7.70 OPC Communication User Guide

19

Afcon Software and Electroncis Ltd

3.

Complete the Item field:

If you know the item Name and Path select the Name button and then type in this
information.

If you do not know the full path, type in the name of the item and then check the Full Path
option to complete the location.

4.

Click the Add Item button to add the selected item to the Advised Items window.

5.

The Copy button can be used to copy the item and its path into another location.

Removing an item from a group


1.

From the Group window, select a group.

2.

From the Advised Items window select the advised item.

On your keyboard, press the Delete button.

Right click and select the Remove Item option.

From the Items menu, select the Remove option.

Removing an advised item used in another P-CIM module


If you wish to remove an advised item used in Operator Workstation or another P-CIM module.

Data blocks must first be deleted from the Database Editor before they are removed from the
OPC Browser

1.

In the other module,change the status of the selected item to not advised. (for example, by
closing the display).

2.

Remove the advised item from the OPC Browser.

Writing a new value to an advised item


This option is used to manually update values during runtime.
1.

From the Groups window select a group and from the Server window select an advised item.

2.

Open the Writing dialog box, right click and select the Write Value option
or in the Items menu select the Write option.

P-CIM 7.70 OPC Communication User Guide

20

Afcon Software and Electroncis Ltd

3.

Modify the value in the New Value field.

4.

Click OK to confirm the new definitions and to exit this dialog box.

Values can also be updated manually in the Operator Workstation module.

Advising multiple items


This option enables advising items in bulk quantity of up to 3000 items per batch.
Multiple items can be added to the monitored list in one of the following ways:

To add items from a specific location in a set quantity


1.

From the Items window select the relevant items.

2.

On your keyboard, press the Shift button.

3.

Double click to add the items to the monitored list


or right click and select the Add Items option.

4.

The items are added to the monitored list.

To add a Sequential List

From the Groups window select a group and then in the OPC Items window select the first item
from which to create multiple advised items.
5.

From the Items menu select the Multiple Advised option. The Add Multiple Items dialog
box opens, and the From field displays the name of the selected item.

6.

Type in the number of items into the Amount field.


If,for example, 70 is entered, the selected item and 70 items after it are added to the
Advised Items window.

7.

Click OK to save this definition and to exit this dialog box.

Options Menu
This menu has the following options:

Monitoring

P-CIM item syntax

OPC Browser Configuration

P-CIM 7.70 OPC Communication User Guide

21

Afcon Software and Electroncis Ltd

Monitoring, displaying advised items


1.

From the Options menu select the Monitoring option

or in the toolbar click the

Monitoring button.

The Advised Items list is displayed with the following columns:

Table 2: OPC Browser Options Menu


Column

Description

Item name

Displays the full name and location of the item.

Value

Displays the value of the item in the OPC server.

Data type

Displays the items data type as defined in the OPC server. For example, word,
double word.

Time Stamp

Displays the time of the last update of the item by the OPC Browser.

Column

Description

Quality

Each OPC items value has an indication of its quality. This is known as the OPC
Item Quality. The quality of an item is based on whether or not the physical device
has provided a value for the Item ID.
Quality status can be:
Good, indicating that a value has been sent by the physical device for the
OPC item.
Bad, indicating that a value has not yet been received for the OPC item and
the value is unknown.

Access

Defines if this item is read only or read and write.

P-CIM 7.70 OPC Communication User Guide

22

Afcon Software and Electroncis Ltd

When the Monitoring option is selected, data is transferred between the OPC Browser and the
OPC server. Advised items and their details are displayed in the Advised Items window. This
process uses extensive CPU memory resources. Afcom recommends using this option only
when necessary.

Displaying item syntax


In the Options menu select the P-CIM Item Syntax option. The full Server|Topic!Item syntax of the
item is displayed in the Address bar.

Configuring OPC Browser Configuration


This option is used to define the OPC Browser settings.
From the Options menu:
1.

Select the OPC Browser Configuration option. The General tab is displayed.

The OPC Browser Configuration dialog box has the following fields:

P-CIM 7.70 OPC Communication User Guide

23

Afcon Software and Electroncis Ltd

Table 3: OPC Browser Configuration


Field

Description

Connection
settings

Timeout

Defines the maximum/minimum amount of time waited to


connect to the OPC server and to receive a list of items from
it.

Data change rate

Defines the interval for scanning updated OPC server


advised items.

Log Alarm
Handler

When checked, indicates that advised items from the


callback server are written to and displayed in the Alarm
Handler.

Logging
options

Indicates whether (or not) the advised item is logged:

Log(0-2)

0 = not logged
1 = logged
2 = internal use only

2.

Click the Keep Alive tab.

This dialog box is used to define the continual communication of OPC servers connected to the OPC
Browser. It has the following fields:

Field

Description

Communication
(10-36000)

Indicates the time interval between each communication test.

Communication
test attempts

Indicates the number of communication test attempts.

P-CIM 7.70 OPC Communication User Guide

24

Afcon Software and Electroncis Ltd

Time attempts

Indicates the number of seconds between each reconnect communication


attempt.
When 0 is defined this indicates that reconnection to an OPC server can be made
manually by clicking the Reconnect button.

P-CIM 7.70 OPC Communication User Guide

25

Afcon Software and Electroncis Ltd

Using the OPC Browser in a P-CIM Project


When developing a project, an object whose data is processed through the OPC Browser and OPC
servers must have syntax assigned. As in all P-CIM modules, the syntax used in the OPC Browser is
built from Server|Topic!Item elements, where:

Server = OPCSrv

Topic = OPC server name

Item = Itemname

The following syntax can be used to advise items per group: groupname(itemname)
For example, Group 1 will have the following syntax: Group1(DBSR.P-CIM.$WDAY)

Creating an object and adding OPC Browser syntax


The Animation Editor is used to develop the graphical display of a P-CIM project. During runtime, the
display is shown in the Operator Workstation on the operators station, and acts as an interface
between the operator and the factory floor.
1.

From the P-CIM Group, click the Animation Editor icon to access the Animation Editor.

2.

Create or select an object in a display

3.

Double click the object


or right click the object and select the Properties option.

4.

The Properties dialog box is displayed.

The example below displays the Server|Topic!Item of an object that has input properties.

Creating datablocks
Data blocks are generally defined for generating alarms and history collection.
From the P-CIM Group, double click the Database Editor icon to access the Database Editor. The
example below displays the AV1 data block.

P-CIM 7.70 OPC Communication User Guide

26

Afcon Software and Electroncis Ltd

The Database Editor can only be fully accessed when P-CIM is running.

Displaying a P-CIM OPC items syntax in the OPC Browser


From the View menu, select the Address bar option to display the address bar.
From the Items window click an item.
For example, when A1 is selected in the Items window, the following syntax is displayed in the Address
bar.

OPCsrv|PFWOPCGateway.Server!DBSR.PCIM.A1

Where:

Server = OPCSrv

Topic = PFWOPCGateway.Server

Item = DBSR.PCIM.A1

OPC Browser Alarm Summary Messages


Activity in the OPC Browser is viewed in the Alarm Summary window. Messages can be generated for:

Successful/ failed OPC server connection.

OPC server disconnection/ reconnection from the OPC Browser.

Success/failure to advise items.

OPC Browser loader successfully.

OPC Browser receives a request to close.

OPC Browser successfully closed.

P-CIM 7.70 OPC Communication User Guide

27

Afcon Software and Electroncis Ltd

P-CIM OPC Gateway


The P-CIM OPC Gateway is a P-CIM OPC server program that runs in P-CIM. It can be connected to
any OPC client.
The function of the OPC Gateway is to send data from P-CIM servers to external OPC client programs
via OPC protocol. Once an OPC client is connected to the OPC Gateway, the Gateway runs
automatically, bringing data from the following P-CIM servers:

BasicSrv

DBSR

PfwAlarm

PFWDrvr

TxtSrv

The diagram below illustrates how data is received from P-CIM servers, translated by callback protocol
and sent to the OPC Gateway.
The data is then translated by OPC protocol and sent to external OPC clients. This is a bidirectional
process.

Running the OPC Gateway


During runtime, when an OPC client is connected, the OPC Gateway runs automatically and

the

OPC Gateway icon is displayed in the traybar as an indicator.

OPC item settings can be updated during runtime, If you wish to define new items or settings before
the OPC client runs, open the Gateway manually.

To open the Gateway manually: From the P-CIM Runtime icons group double click the OPC
Gateway Editor icon.

P-CIM 7.70 OPC Communication User Guide

28

Afcon Software and Electroncis Ltd

OPC Server Properties


Open the OPC Browser and from the Server menu select the PfwOPCGateway Server Properties
option.

Field

Description

Synchronous
Read

When enabled the OPC Browser polls the OPC Gateway for advised items every
60 seconds using synchronous read..

Synchronous
Write

When checked enables the OPC Browser to write advised items values in
synchronous connection.

Case Sensitive

To enable usage of the case sensitive function,Case Sensitive check box.

Communication
test interval

Defines the time interval between each communication test. Default = 30 seconds.
Range: 10-36000 seconds.

Communciation
test attempts

Defines the number of communication attempts that will be made by the OPC
Browser until failed. Default = 3 attempts. Range: 1-100

Time between
reconnect
attempts

Time interval between reconnection attempts. Default = 60 seconds.

When P-CIM is not running, it is automatically started up if the OPC Gateway icon is double clicked in
the P-CIM Group. Right clicking the OPC Gateway traybar icon displays three options:

About: when clicked displays details about P-CIM and the OPC Gateway.

Edit: when clicked displays the P-CIM OPC Gateway Editor.

Shutdown: when clicked shutsdown the OPC Gateway server.

The OPC Gateway Editor


The P-CIM OPC Gateway Editor enables definition of:

P-CIM 7.70 OPC Communication User Guide

29

Afcon Software and Electroncis Ltd

Address names and settings.

An items Read/Write/Read and Write access permission.

An items data type.

To access OPC Gateway Editor dialog box: From the traybar right click the OPC Gateway icon and
select the Edit option.

This dialog box has the following fields:

Table 4: OPC Gateway Properties


Field

Description

Name

Where the name of a new item is defined.

Server

Indicating the type of P-CIM server used, which can be: BasicSrv, DBSR,
PfwAlarm, PfwDrvr or TxtSrv.
Note: The BasicSrv, PfwDrvr, and TxtSrv.servers items can only be assigned to
OPC items in the P-CIM OPC Gateway Editor dialog box.

Topic

Indicating the name of the DDE format topic, which is always Pcim.

Item

Indicating the items address in DDE format.

Data type

Indicating the type of data block. The following block types are available:
Boolean, byte, double, float, long, short and string.

Access

Indicating whether the item is Read, Write or Read and Write in the OPC client.

Table

Listing all item addresses and their settings.

Add

When clicked adds a new item to the Items table.

Delete

When clicked deletes a selected item from the Items table.

Change

When clicked updates a modified item in the Items table.

Save

When clicked saves the settings in the OPC Gateway.

Close

When clicked shuts down the OPC Gateway Editor.

P-CIM 7.70 OPC Communication User Guide

30

Afcon Software and Electroncis Ltd

Example Defining an OPC Item in the OPC Gateway Editor

Field

Settings

Name

Item 1

Server

DBSR

Topic

Pcim

Item

D:1

Data type

Boolean

Access

Read

1.

Open the OPC Gateway Editor dialog box.

2.

Complete the dialog box fields using the information in the table above

t
3.

Click the Save button to confirm these settings.

4.

To view/ read/ write the OPC item, connect the OPC client to the OPC Gateway.

If the OPC client is already connected it may need refreshing manually when new items are
added.Other OPC clients are automatically updated.

Viewing OPC Items in a Client Interface


In the OPC client Connect field, select and enter the PfwOPCGateway.Server key to the connect
between the client and the OPC server.
OPC items are displayed in an Items tree such as the one below:

P-CIM 7.70 OPC Communication User Guide

31

Afcon Software and Electroncis Ltd

Branch

Containing

PfwOPCGateway.Server

Indicates which OPC key is used to reference the OPC server. This
name is automatically displayed in the Servers List in the client.

DBSR

This branch holds P-CIM Database Server items.

PfwAlarm

This branch holds P-CIM Alarm Server items


The PfwAlarm branch is only displayed when the Advanced Alarm
Handler module is open and if items have been defined in it.

User

This branch is a container for the OPC items defined in the OPC
Gateway Editor.

P-CIM 7.70 OPC Communication User Guide

32

Afcon Software and Electroncis Ltd

OPC Browser Troubleshooting


General
The OPC Browser fails to advise items.
Possible Cause: Upper Case Sensitivity in OPC Servers

This situation could occur because the OPC server is case sensitive. The following definitions must be
set when working with an OPC server that is case sensitive:

File: OPC server name Section: General Token: Uppercase = 0

The file name is the name of the OPC server.

The OPC Browser fails to connect to the OPC server,or connects but does not
display the OPC tree..
Possible Cause: Single Thread Connections to OPC Servers

The OPC server is connected via a single-thread connections (and not via multi-thread connections).
The following definitions must be set when connecting to an OPC server in a single-thread connection:

File: OPCSRV.INI Section:[MainThreadConnection]NameSrvN= Token: OPCserver name

To date, this is a problem only for an Rslinx OPC on a local PC.

Connection Failure Error Message


A connection failure error message may be displayed when the OPC Browser connects to an OPC
server, even though the connection is successful.
To avoid this message the following definitions must be set:

File: OPCSRV.INI Section:[IgnoreConnectError]NameSrvN= Token: OPCserver name

To date, this is a problem only for an Rslinx OPC on a local PC.

Problems with Remote Connections


If you have problems with remote connection, check the OPC servers DCOM settings. During server
startup the DCOM settings may be overwritten.
IAfcom recommends that you contact the manufacturer of the server.

P-CIM 7.70 OPC Communication User Guide

33

Afcon Software and Electroncis Ltd

NO-SEK Stations
P-CIM No-SEK station is able to connect to a remote OPC server only if the P-CIM Master node is
equipped with a site License and Unlimited IO SEK support.
From a NO-SEK node, the OPC Browser will only be able to connect to a remote OPC server which
resides on the P-CIM-Master station.

Message

Description

P-CIM OPC Browser cannot


connect to local OPC server
when no SEK is attached

The OPC Browser cannot connect to the local OPC


server(s) while running on a Non-SEK station

P-CIM OPC Browser cannot


connect to remote OPC server Master SEK is IO limited.

OPC Browser cannot connect to remote OPC servers when


the remote Master is a limited IO SEK.

P-CIM OPC Browser cannot


connect to remote OPC server Master sites limitation.

OPC Browser is unable connect to remote OPC servers


when the Master nodes threshold has been reached. The
"Connect" dialog box the "Network OPC Servers" button
isdisabled.

P-CIM OPC Browser cannot


connect to remote OPC server
remote IP address is not equal to
P-CIM Master IP

The network OPC gateway is not reachable or the IP


address is incorrect

P-CIM OPC Browser cannot


connect to remote OPC server
invalid IP address syntax

An incorrect P-CIM Master IP or it does not exists.

P-CIM 7.70 OPC Communication User Guide

34

You might also like