Você está na página 1de 3

1 Using the OPC Client

How to use of the supplied Softing OPC Client is described in the following sections. The
Client functionality can be divided into a configuration part and an on-line part described in
the following sections.
IMPORTANT NOTE:
Use of this Client for commercial purposes is prohibited.

1.1 Configuration
1.1.1 Selecting a Data Access Server
To select a Data Access Server, use menu option Server->Add. In the dialog Server, you
can specify the computer where the Server is to be started. When the tab Browse is
selected, the Servers installed on the corresponding computer are displayed. After selecting
and double-clicking a Server, the Server description is displayed in the box Description.
Click OK to confirm that these Servers should be used in the current configuration. The user
dialog is illustrated in Fig. 1-1:

Fig. 1-1: Client window for selecting a Server

You can specify a symbolic name for the Server selected.


The status information (manufacturer, version, etc.) is read from the Data Access Server via
the tab Status.
The tab Errors contains information about the problems which occurred while processing
OPC calls. Object states are displayed via different colored circles.
After confirming with OK, The Server appears in the upper left half of the screen under the
symbolic name used and is identified with a red dot.
1.1.2 Adding an OPCGroup object
To add an OPCGroup object, use menu option Group->Add. You can specify a symbolic
name again for the OPCGroup object. The corresponding user dialog is displayed in Fig. 1-2.

Fig. 1-2: OPC Client window for selecting an OPCGroup object


OPCGroup objects can be created at runtime in two different ways: 1) By calling the method
AddGroup or 2) via PublicGroupByName.
The methods are selected via ConnectionType. When using GetPublicGroupByName,
you must specify the corresponding name in the entry box Group Name.
If an OPC Server PublicGroups is not supported, you therefore cannot use this functionality.
Furthermore, you may select how the data are acquired from the Data Access Server. The
OPCGroup object supports either AsynchronAdvises or SynchronReads. In the first case,
a Callback connection can be built over which the values are transferred depending on the
setting of UpdateRate and PercentDeadband. You can also execute Refreshes (menu
option Group Refresh in on-line operation). In the second case, the values are read
synchronously.
You can also set the following in the dialog box:
• Update Rate, default is 1000 ms
• Time Bias, default is 0
• Deadband, default is 0
• Local ID, default is 0
The values of the last three parameters can only be modified after they have been activated.
Information regarding the processed functionality is displayed in the tab Errors.
After confirming with OK, the OPCGroup object appears under the specified name in the top
left half of the window and is identified with a red circle.
1.1.3 Adding an OPCItem object
To add an OPCItem object, use menu option Item->Add. The user dialog is depicted in Fig.
1-3.
Several dialog boxes now appear in the bottom section of the dialog.
It may take some time until the contents of the dialogs become visible, since the applicable
Data Access Server must be started first. This is indicated by the yellow circle next to the
Server.

Fig. 1-3: OPC Client window for selecting an OPCItem object

You can browse the namespace of the Server using the tab Browse. The right window
displays the variable Items. The fully qualified ItemID is moved in the corresponding box
upon double-clicking an Item.
After confirming with OK, the Item appears in the top right half of the window and is identified
with a red circle.
Browsing the namespace can be controlled via filters. The Itemattributes are displayed
during on-line operation using the tab Item.
The tab Errors provides information about the problems which occurred while processing
the methods.
How the Item is to be represented in the right window can be determined via menu option
View->Options.
You can also add and remove Items using the corresponding icons .
You can store the selected settings in a file which you can load again later. Objects for which
you deactivate the checkbox Persistent are not stored.
Several Data Access Servers can be combined within a session.
1.2 Online operation
In on-line operation, you can control the behavior of the Client by executing various
commands.
Selecting Connect creates all configured objects in the Data Access Server. The color of the
circle changes to yellow.
When Start is called, the configured objects in the Data Access Server are created, and data
exchange is initiated. The color of the circle changes to green.
Disconnect disconnects all connections again and removes the objects. The color of the
circle turns to red.
Any problems which occur are displayed by the color of the circle (red-yellow or red-green).
You can execute the commands in a variety of ways:
1. Menu options
Session->XXX, Server->XXX, Group->XXX, Item->XXX
2. Icons
3. Popup menus
When calling Start and Connect, you can still select between the options deep and flat.
In the first case, the call is applied to all objects which are hierarchically below the current
object.
In the second case, the called is only applied for the currently selected object.
You can write values to an OPCItem object by selecting the tab Item and entering the
appropriate values in the tab Write.

Fig. 1-4: OPC Client window for writing an OPCItem object

Você também pode gostar