OPCClient Object
The OPCClient object functions as the ArchestrA OPC Data Access Client for third-party OPC (OLE for Process Control) Data Access Servers. The OPCClient object provides functionality similar to OPCLink.
Click one of the following Help topics to navigate to information about that topic.
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Overview
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The OPCClient object is a key member of the core set of AutomationObjects within the ArchestrA system infrastructure. The OPCClient object is a DeviceIntegration (DI) object that allows access to a running OPC Data Access (DA) Server. A third-party OPC DA Server can provide data points to Galaxy application objects through the OPCClient object.
Note The OPCClient object is compatible with all OPC Servers that are compliant with OPC Data Access v2.05 or later standards.
There is a one-to-one relationship between an instance of the OPCClient object and a running OPC DA Server. If you want to reference data points in more than one OPC DA Server, you must configure and deploy more than one OPCClient object. For example, you would need to configure one OPCClient object to communicate to an ABTCP OPC Server and another one to talk to the ABCIP OPC Server.
An OPCClient object supports the following operations on I/O points for the OPC DA Server:
- Subscriptions, which are implemented via scan groups. For more information, see Scan Groups.
Important! If you are using this object to communicate with an OPC DA Server, you must properly configure the OPC DA Server before deploying this object.
Items in a scan group, block read, or block write are “dynamic” in that they are created or activated dynamically during run time.
For a block read, if the quality of a dynamic attribute changes, but a data value update is not received from the data provider, the current time of the hosting AppEngine is used as the new time stamp. If the data quality transitions to GOOD because a data update was received, the value and time stamp passed in with the data update is used for the attribute.
For a block write, the time stamp of the attribute is updated to the time stamp provided by the set request. If no time stamp is provided, the current time of the hosting AppEngine is used. If the quality of an attribute changes because of a failed set request, the current time of the hosting AppEngine is used as the new time stamp.
OPC Client Reconnection
The OPC Client performs the following actions when connecting or reconnecting:
- When the OPC Client starts, it tries to connect immediately.
- If the OPC Client is already connected and gets disconnected, it immediately tries to reconnect, increasing the restart count by 1.
- After a restart period, the OPC Client attempts to reconnect again increasing the restart count by 1.
- When the restart maximum count is reached after exactly <configured number of seconds>, the restart alarm triggers and no further restarts are attempted.
- When the OPC Client connects, the restart count gets set to zero (0) and lowers the restart alarm.
- If the reset restart is set to TRUE, the restart count gets set to zero (0) and lowers the restart alarm. The OPC Client attempts to reconnect immediately. If it is already connected, setting the reset restart does not disconnect and reconnect the OPC Client.
For general information on objects, including relationships, deployment, and alarm distribution, see the Integrated Development Environment (IDE) documentation.
For information on configuration options of object scripts, attributes, or features, click Attributes Help in the Help file header.
Related Topics
Run-Time Behavior
Configuration
Run-Time Object Attributes
OPC Data Access Server Security Settings
In order for the OPCClient object to connect to a third-party OPC DA Server, certain security settings are required on the third-party OPC DA Server node.
Note These same settings must be applied to OPCEnum if the OPCClient is to use the server name instead of the progID.
If the OPC Server is a Wonderware DAServer, no additional configuration is required.
The recommended settings are explained as follows. All of these setting can be set with Windows utility DCOMCnfg.Exe.
- Run DCOMCnfg.Exe.
- In the list of applications, select the OPC DA Server and then click Properties.
Note Under some conditions, the third-party OPC DA Server may not appear in the list of applications. In this case, you will need to create server specific AppID and run DCOMCnfg.Exe again. For information on creating AppID for COM objects, see the Microsoft documentation.
- Click the General tab.
- In the Authentication Level list, click None. (The default setting is "Default.")
The authentication level informs the component object model (COM) how much authentication protection is required, and it can range from authenticating the client at the first method call to encrypting parameter states fully.
- Click the Security tab to configure who is allowed to launch permissions and access permissions to the server.
The launch permissions control the list of users who are granted or denied permission to launch a particular server.
You can control the list of users who are granted or denied access to the methods of a particular server by setting access permissions. You can add users or groups to the list, specifying whether access permission is being granted or denied. You can also remove users from the list.
When setting access permissions, you must ensure that both SYSTEM and Everyone are included in the list of users that are granted access.
- Select Use custom access permissions and Use custom launch permissions.
- For each of them, click Edit and then add "Everyone" and "System" to the list of users allowed to access and launch the server.
- Click the Identity tab to configure the identity of the server.
An application's identity is the account that is used to run the application. The identity can be that of the user that is currently logged on (the interactive user), the user account of the client process that launched the server, a specified user, or a service. Thus, you can select from one of the following three options:
- The interactive user
The interactive user is the user that is currently logged on to the computer where the application is running. If the identity is set to be the interactive user, all clients use the same instance of the server if the server registers its class factory as multi-use. If no user is logged on, the application will not run. If the server has a graphical user interface (GUI) that the client needs to see, you should use interactive user for the application's identity. However, choosing this identity carries some security risks because the server runs under the identity of the logged on user without the logged on user's knowledge or consent.
- The launching user
This is the default setting for the application identity. When the launching user is chosen for the application's identity, each client account gets a new instance of the server, and each server gets its own WinStation. Because of the separate server instances, launching user is the most secure identity setting. However, there are limits on resource consumption. Also, any GUI the server displays will not be seen by the client. Although this is the option selected by default, we recommend to avoid selecting this option.
- This user
Specifying a particular user (and the user's password) is the preferred identity for COM servers. The reason this identity is preferred is that no one has to be logged on the machine where the server is running for the server to run, and every client talks to the same instance of the server if the server registers its class factory as multi-use. If the server has GUI, then you should not choose this identity; if you do, the user will not be able to see the user interface. Running as a fixed user account is more secure than the interactive user identity because this identity can only be assigned to the application by someone who has the specific user's password.
Related Topics
Overview
Scan Groups
A scan group, or device group, is a collection of attributes that have a common update interval. When you configure the OPCClient object, you will need to specify at least one scan group in order to deploy the object. Within each scan group, you can specify data items to use as the object attributes. At run time, items for a scan group will be updated with the latest values from the OPC DA Server according to the update interval.
From other objects and from scripts, you can reference the attributes (items) you configured for the OPCClient object. For example, you might configure the input source for a FieldReference object to reference an item for one of the scan groups. Thus, the FieldReference object input source would be receiving data from an OPC DA Server via the OPCClient object.
Tip You can use any OPC client tool to browse a field device's address space for item names.
The reference syntax for a OPCClient object data point is:
<objectname>.<scangroupname>.<itemname>
The <objectname> is the name that you choose to give to the OPCClient object.
The value of <itemname> depends on the type of OPC DA Server you are connecting to. For information on how to reference data points in the OPC DA Server, see the server documentation.
Run-time object attributes allow you to monitor errors related to the data quality for item values in a scan group.
Related Topics
Overview
Block Reads and Block Writes
Block Reads and Block Writes
A block read is a set of attributes that can be used to retrieve values in a single transaction. Instead of the I/O points being on advise, as with a scan group, the attributes are updated once per transaction. A block read must be initiated from a user or script via the BlockRead.TransactionTrigger attribute.
A block write is a set of attributes that can be used to write values in a single transaction. Only values that are new for the attribute since the last transaction are written to the OPC DA Server. A block write must be initiated from a user or script via the BlockWrite.TransactionTrigger attribute. You cannot trigger another transaction if the previous transaction has not completed.
Note Although block reads and writes are intended to be individual transactions, the actual communication with the field device is dependent on the number and type of attributes, and it may be necessary to send and receive multiple messages to and from the field device. As a result, the values exposed after a block read operation might have been obtained at different times. You must carefully design the logic in the field device to make sure that the values do not change until the full read operation is completed. In the case of a block write operation, the logic in the field device must not use the written values until the full write operation is completed.
For a block read, either all of the attributes will be updated or none of the attributes will be updated; no partial updates are supported. In the case of a block read failure or transaction timeout, the data quality for all attributes is set to BAD.
For a block write, partial writes are supported. However, the system does not offer roll-back functionality. In the case of a block write failure or transaction timeout, some values may have been successfully sent, but there is no way to undo the value changes. For items that have not yet been written to, the data quality is set to BAD.
Finally, run-time object attributes allow you to monitor errors related to the data quality for item values in a block read or block write operation.
Related Topics
Overview
Scan Groups
Run-Time Behavior
The following information describes the run-time behavior of OPCClient objects. Run-time behavior is limited to the state of individual OPCClient objects.
After it has been deployed and is operating, an OPCClient object can assume one of several states, which are described in the following table:
|
State Change
|
Behavior
|
|
Startup
|
In this state, the OPCClient object connects to the OPC DA Server.
|
|
Going onscan
|
None.
|
|
Running onscan
|
In this state, the OPCClient object:
- Services read and write requests.
- Receives values from the OPC DA Server scan groups (device groups).
- Monitors the connection to the OPC DA Server.
- Detects alarm conditions, if alarming is enabled.
- Monitors the data quality for OPC DA Server data values and updates run-time error statistics if the quality is not GOOD.
|
|
Going offscan
|
None. The ConnectionStatus attribute is set to "Disconnected."
|
|
Offscan
|
The object is passive and does not service read and write requests.
|
|
Shutdown
|
In this state, the OPCClient object disconnects from the OPC DA Server.
|
Related Topics
Overview
Configuration
Run-Time Object Attributes
Configuration
The following table describes the object editor options for configuration and the associated attributes:
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For general information on objects, including relationships, deployment, and alarm distribution, see the Integrated Development Environment (IDE) documentation.
For information on configuration options of object scripts, attributes, or features, click Attributes Help in the Help file header.
Related Topics
Overview
Run-Time Behavior
Run-Time Object Attributes
General Configuration
Use the General tab to specify the OPC DA Server from which to retrieve data and to configure restart options.
|
Editor Option
|
Associated Attribute
|
Description
|
Run-Time Access (Supervisory, User, Read-Only, None)
|
|
Server node
|
ServerNode
|
The name of the node (computer) on which the OPC DA Server is running. If this attribute is blank, the OPC DA Server is assumed to be running on the local node.
Click the Browse button to find the network for the node.
|
Supervisory, User
|
|
Server name
|
ServerName
|
The name of the OPC DA Server. The naming syntax for the OPC DA Server varies according to the type.
|
Supervisory, User
|
|
Run server out-of-proc
|
ServerActivation
|
If enabled, the OPC DA Server will be run out-of-process. An in-process OPC DA Server runs as a .Dll within the engine process. An out-of-process OPC DA Server runs as a stand-alone executable. The method you choose depends on the methods supported by the OPC DA Server and performance considerations.
To connect to the OPC DA Server in-process, all of the following must be true:
- The OPC DA Server must be installed locally relative to where the OPCClient is installed.
- The OPC DA Server must support an in-process connection.
- The OPC DA Server is not currently running out-of-process.
- The value of the ServerNode attribute must be blank.
- This Run server out-of-proc check box must be unchecked.
|
Read-Only
|
|
Use scan group name as access path
|
DAGroupAsAccessPath
|
If enabled, the name of the scan group will be used for the OPC access path. Select this option for OPC DA Servers that require a topic to be specified for the access path. You must then make sure that any scan group you specify is named the same as a topic within the OPC DA Server.
|
Read-Only
|
|
Restart attempts
|
RestartMax
|
The maximum number of times that the OPCClient object should attempt to restart a failed OPC DA Server within the restart period.
|
Supervisory, User
|
|
Restart period
|
RestartPeriod
|
The time period, in milliseconds, over which the maximum number of restart attempts applies. If this time period elapses before the maximum number of restarts is exceeded, then the restart count is set back to zero.
|
Supervisory, User
|
|
Detect restart alarm
|
RestartAlarm.Alarmed
|
If enabled, an alarm will be triggered when the number of attempts to start the OPC Server has exceeded the allowed maximum within the restart period.
|
None
|
|
Priority
|
RestartAlarm.Priority
|
See Alarm Attributes.
|
Supervisory, User
|
|
Connection heartbeat period
|
ConnectionHeartbeatPeriod
|
The time interval, in milliseconds, at which the OPCClient object will check the connection to the OPC DA Server.
|
Supervisory, User
|
|
Detect connection alarm
|
ConnectionAlarm.Alarmed
|
If enabled, an alarm will be triggered when the OPCClient object can no longer communicate with the OPC Server.
|
None
|
|
Priority
|
ConnectionAlarm.Priority
|
See Alarm Attributes.
|
Supervisory, User
|
|
Restart reset security
|
RestartReset
|
Used to set security for restarting the OPC DA Server.
|
Supervisory, User
|
Related Topics
Configuration
Scan Group Configuration
Use the Scan Group tab to add scan groups to the OPCClient object.
|
Editor Option
|
Associated Attribute
|
Description
|
Run-Time Access (Supervisory, User, Read-Only, None)
|
|
Scan Group
|
ScanGroupList
|
A unique name for a scan group (device group) in the OPC DA Server from which you want to receive data.
Use the Add (plus sign) button to add a group to the list. Type the group name. To delete a group, select the topic in the list and click the Delete (cross sign) button.
|
Read-Only
|
|
Update Interval
|
ScanGroup.UpdateRateCmd
|
The rate, in milliseconds, at which the object will receive updated data values for the scan group. The default is 250.
|
Supervisory, User
|
|
Scan Mode
|
ScanMode
|
The scanning mode for the scan group, either ActiveOnDemand, Active, or ActiveAll. For the ActiveOnDemand mode, attributes that are not actively being referenced by any client or object are not scanned. For the Active mode, an attribute is always in the active scanning state. When the last reference to the attribute is unregistered (unadvised) , the attribute is deleted. For ActiveAll, an attribute is always in the active scanning state, but when the last reference to the attribute is unregistered (unadvised), the attribute is not deleted.
|
Supervisory, User
|
|
Attribute
|
ScanGroup.ItemList
|
A user-defined name for an item reference. This name is also known as the alias. The maximum number of attributes that can be preconfigured is 5000.
|
None
|
|
Item Reference
|
ScanGroup._AliasReference
|
The item address in the OPC DA Server.
|
None
|
|
import button
|
<scan group name>.ItemList
|
Click to import item data from a .csv file for the selected scan group. A dialog box will appear in which you can specify the file to import. The imported .csv data will be inserted as the associated attributes for the selected scan group. Each attribute and its item reference will be added to the list, as long as there is not already a configured reference with the same attribute name. For duplicate references, you will be prompted to replace the existing reference with the new reference, or ignore the new reference. The import button is unavailable if no scan group is selected or if the associated attributes section is locked from the parent object.
|
None
|
|
export button
|
<scan group name>.ItemList
|
Click to export item data to a .csv file. A dialog box will appear in which you can specify the name and location of the file to be exported. The resulting .csv file will contain one row for each attribute item. Each row includes two columns: Attribute Name and Item Reference. You can edit the file using Microsoft Excel or a text editor. The export button is unavailable if no scan group is selected or if there is no existing associated attribute.
|
None
|
To use the OPC Item Browser to configure attributes for each scan group, click the ellipses button that appears at the far right of the Associated attributes list when you click the Add button (plus sign). For more information about the OPC Item Browser, see Using the OPC Item Browser.
Related Topics
Configuration
Block Read Configuration
Use the Block Read tab to configure a set of items for which values will be read from the OPC DA Server in a single transaction.
|
Editor Option
|
Associated Attribute
|
Description
|
Run-Time Access (Supervisory, User, Read-Only, None)
|
|
Block Read
|
BlockReadList
|
A unique name for a block read group.
Use the Add (plus sign) button to add a group to the list. You will need to type in the group name. To delete a group, select the topic in the list and click the Delete (cross sign) button.
|
Read-Only
|
|
Transaction Timeout
|
BlockRead.TransactionTimeout
|
The amount of time, in milliseconds, allowed for the block read transaction to complete. The default value is 0. There is no transaction timeout when this value is 0.
|
Read-Only
|
|
Access Path
|
BlockRead.AccessPath
|
The OPC address path. The path syntax is specific to the type of OPC Server.
|
Read-Only
|
|
Attribute
|
BlockRead.ItemList
|
A user-defined name for an item reference. This name is also known as the alias. The maximum number of attributes that can be preconfigured is 5000.
|
None
|
|
Item Reference
|
BlockRead._AliasReference
|
The item address in the OPC DA Server.
|
None
|
|
import button
|
<block read name>.ItemList
|
Click to import item data from a .csv file for the selected block read name. A dialog box will appear in which you can specify the file to import. The imported .csv data will be inserted as the associated attributes for the selected block read name. Each attribute and its item reference will be added to the list, as long as there is not already a configured reference with the same attribute name. For duplicate references, you will be prompted to replace the existing reference with the new reference, or ignore the new reference. The import button is unavailable if no block read name is selected or if the associated attributes section is locked from the parent object.
|
None
|
|
export button
|
<block read name>.ItemList
|
Click to export item data to a .csv file. A dialog box will appear in which you can specify the name and location of the file to be exported. The resulting .csv file will contain one row for each attribute item. Each row includes two columns: Attribute Name and Item Reference. You can edit the file using Microsoft Excel or a text editor. The export button is unavailable if no block read name is selected or if there is no existing associated attribute.
|
None
|
To use the OPC Item Browser to configure attributes for each block read group, click the ellipses button that appears at the far right of the Associated attributes list when you click the Add button (plus sign). For more information about the OPC Item Browser, see Using the OPC Item Browser.
Related Topics
Configuration
Block Write Configuration
Use the Block Write tab to configure a set of items for which values will be written to the OPC DA Server in a single transaction.
|
Editor Option
|
Associated Attribute
|
Description
|
Run-Time Access (Supervisory, User, Read-Only, None)
|
|
Block Write
|
BlockWriteList
|
A unique name for a block write group.
Use the Add (plus sign) button to add a group to the list. You will need to type in the group name. To delete a group, select the topic in the list and click the Delete (cross sign) button.
|
Read-Only
|
|
Transaction Timeout
|
BlockWrite.TransactionTimeout
|
The amount of time, in milliseconds, allowed for the block read transaction to complete. The default value is 0. There is no transaction timeout when this value is 0.
|
Read-Only
|
|
Access Path
|
BlockWrite.AccessPath
|
The OPC address path. The path syntax is specific to the type of OPC Server.
|
Read-Only
|
|
Attribute
|
BlockWrite.ItemList
|
A user-defined name for an item reference. This name is also known as the alias. The maximum number of attributes that can be preconfigured is 5000.
|
None
|
|
Item Reference
|
BlockWrite._AliasReference
|
The item address in the OPC DA Server.
|
None
|
|
import button
|
<block write name>.ItemList
|
Click to import item data from a .csv file for the selected block write name. A dialog box will appear in which you can specify the file to import. The imported .csv data will be inserted as the associated attributes for the selected block write name. Each attribute and its item reference will be added to the list, as long as there is not already a configured reference with the same attribute name. For duplicate references, you will be prompted to replace the existing reference with the new reference, or ignore the new reference. The import button is unavailable if no block write name is selected or if the associated attributes section is locked from the parent object.
|
None
|
|
export button
|
<block write name>.ItemList
|
Click to export item data to a .csv file. A dialog box will appear in which you can specify the name and location of the file to be exported. The resulting .csv file will contain one row for each attribute item. Each row includes two columns: Attribute Name and Item Reference. You can edit the file using Microsoft Excel or a text editor. The export button is unavailable if no block write name is selected or if there is no existing associated attribute.
|
None
|
To use the OPC Item Browser to configure attributes for each block write group, click the ellipses button that appears at the far right of the Associated attributes list when you click the Add button (plus sign). For more information about the OPC Item Browser, see Using the OPC Item Browser.
Related Topics
Configuration
Using the OPC Item Browser
The OPC Item Browser allows you to browse the namespace of an OPC Server and choose items to add to a scan group, block read group, or block write group.
The browser has seven main components:
- Branches window – displays the logical groupings of items as configured in the application.
- Available Items window – displays all items associated with the grouping selected in the Branches window.
- Basket (Selected Items) window – displays those items that have been selected from the Available Items list for inclusion in a scan group, block read or block write group. To add items to the Basket, select one or more in the Available Items window (multi-select is allowed) and click Add (the plus sign). Alternatively, you can click-and-drag items to the Basket; select items and press Enter; or right-click the selected item(s) and click Add to Basket on the options menu. Duplicate items will not be added to the basket.
- OK button – closes the browser and adds items in the Basket window to the Associated attributes list in the object’s editor.
- Filter button – starts the Specify Filter Criteria dialog box, in which you can set filtering criteria that restricts the data shown in the Available Items window. See "Specify Filter Criteria Dialog Box" below for more information.
- Cancel button – closes the browser and does not add items in the Basket window to the Associated attributes list in the object’s editor.
- Status bar – based on the cursor location, it displays hint information such as which application you are browsing and the node it is located on, or what to do when items are selected in the Available Items window.
Note When you click OK, each item in the Basket window becomes a separate attribute in the object editor’s Associated attributes list. If a Basket item already exists in the Associated attributes list, it is not added again to the list and a message is displayed informing you that some item(s) in the Basket list were duplicates.
Note When you close the browser with either the OK or Cancel button, the Basket window and all filter criteria is reset.
Properties Dialog Box
Use the properties dialog box to view application data about an item selected in the OPC Item Browser. This dialog box is for information only; you cannot change the data shown.
Open the dialog box by right-clicking on an item and clicking Properties in the option menu. Click the close button (X) to close the dialog box.
The title bar displays the application grouping hierarchy (as shown in the Branches window of the browser) and the item selected. Two columns of data display each property and its current value.
Specify Filter Criteria Dialog Box
Use the Specify Filter Criteria dialog box to control the number of items displayed in the Available Items window of the browser. After you set filter criteria, it applies to the items shown for any group selected in the Branches window of the browser.
Click the Filter button on the browser to open this dialog box. Click OK to close it and activate the filter criteria; click Cancel to close with no filter criteria set.
Note Filter criteria stays in effect on displayed browser contents until the browser is closed. At that point, the filter dialog box displays the default settings, as shown below.
The filter dialog box provides three sets of filters:
- Item Name – type a specific item’s name or use wildcards (* and ?) to widen the range. Default setting is all item names (*). Wildcards function like typical Windows wildcards: * replaces several characters, ? replaces a single character.
- Item Data Type – select "Any" or one of the following OPC data types: short, integer, float, real, currency, data, string, boolean or unsigned char. If the data type is an array element, click the checkbox. The item syntax for array elements is <sg>.Attribute(<item>)[<index>]. Default settings are "Any" and unchecked.
- Item Access Rights – select the type of OPC access rights of the desired items: Readable Only, Writeable Only or Readable and Writable. Default setting is "Readable and Writable."
Related Topics
General Configuration
Example Configuration
The following is an example of how to configure an instance of $OPCClient to connect to the OPC Server associated with an instance of $ABTCPPLC5. This example is atypical because you do not need to use an $OPCClient instance to communicate with this OPC Server; the $ABTCPPLC5 instance already does that. Instead, the purpose of this example is to illustrate the correct namespace syntax to use when adding items to the OPCClient object.
For the example, assume the following:
- An Allen-Bradley PLC5 is connected to the network.
- Wonderware Application Server is installed.
- The ABTCP.aPKG and ABTCPPLC5.aaPKG templates have been imported into the IDE.
Step 1: Configure the $ABTCPPLC5 Instance
Assume you have a WinPlatform called P01.
To configure the instance
- Create following hierarchy of objects as seen from the deployment view:

- Edit ABTCPPLC5_001.
- Specify the host name (that is, the IP address of the PLC).
Tip From a command prompt, you should be able to execute a PING command to the IP address of the PLC and get a response.
- Click the Scan Group tab and add a scan group. For example, SG1.
- Save and close the editor.
Step 2: Deploy the $ABTCPPLC5 instance and test connectivity to the PLC
To deploy and test
- In the IDE, deploy the four objects onscan by choosing to cascade deploy on P01.
Note In Windows Task Manager, you should see DASABTCP.exe. This is the DAServer, which is also an OPC Server.
- In Object Viewer, right-click on ABTCPPLC5_001 and click View.
- Check that the ABTCPPLC5_001.ConnectionStatus attribute indicates "Connected."
- In Object Viewer, add ABTCPPLC5_001.SG1.s2:23 to the watch. In this example, s2:23 is the current second of the PLC time.
This item's value should change every second. If so, the ability to read data from the PLC has been confirmed.
Step 3: Configure the $OPCClient instance
To configure the instance
- Create an OPCClient_001 instance from $OPCClient and assign it to AppEngine_001.
- Edit OPCClient_001.
- Specify the server node. For this example, assume SERVER1 is the node name.
- Do the following:
- In the Server name list, click ArchestrA.DASABTCP.1.
- Click the Scan Group tab add a scan group. For this example, add SG2.
- Click the + sign to add associated attributes for SG2:
- Click the ellipsis (...) button that appears below the Item Reference column to browse the OPC Server. This launches the OPC item browser.
- Expand the tree.
- Click on ABTCPPLC5_001.
- Right-click on $Sys$ItemCount and click Add to Basket.
Browsing helps you understand the namespace of the DASABTCP.exe OPC Server. Now that you know how to get registers from the PLC, the syntax will be:
OPCClient001.SG2.ABTCP_001.ABTCPPLC5_001.PlcRegisterName
- Click OK.
- Save and close the editor.
Step 4: Deploy the $OPCClient instance and test connectivity to the PLC
To deploy the instance and test connectivity
- Deploy OPCClient_001.
- In Object Viewer, check that the OPCClient_001.ConnectionStatus attribute indicates "Connected."
- In Object Viewer, add the OPCClient_001.SG2.ABTCP_001.ABTCPPLC5_001.$SYS$ItemCount attribute to the watch window. After a couple of seconds, the attribute should indicate a value and a quality of C0:GOOD.
- If you want to see register s2:23 as part of the OPCClient (as opposed to part of the ABTCPPLC5 object), add the OPCClient_001.SG2.ABTCP_001.ABTCPPLC5_001.s2:23 attribute to the watch window.
An additional way to understand the DAServer's namespace is by using the System Management Console (SMC). Open the SMC, and then click on DAServer Manager. For example:
Related Topics
General Configuration
Run-Time Object Attributes
The following table describes the run-time only attributes for the object.
|
Topic Category
|
Topic Subcategory
|
Topic Details
|
|
|
|
|
|
|
|
Note Configurable run-time attributes are described in the configuration sections. For more information, see Configuration.
For a list of common attributes, click Attributes Help in the Help file header.
|
Attribute
|
Description
|
Run-Time Access
(Supervisory, User, Read-Only, None)
|
|
AlarmDSCnt
|
The total number of disabled and silenced alarms in the object. Sub-areas or sub-notification-distributors are not included.
|
Read-Only
|
|
AlarmOnCnt
|
The number of active alarms in the distributor. Does not include sub-areas or sub-notification-distributors.
|
Read-Only
|
|
AlarmUnAckCnt
|
The number of unacknowledged alarms in the distributor (including unacknowledged return-to-normals). Does not include sub-areas or sub-notification-distributors.
|
Read-Only
|
|
BlockRead.AliasDatabase
|
Used to store pairs of alias attribute names and the corresponding item references.
|
Read-Only
|
|
BlockRead.ItemCnt
|
The total number of items in the group that are on advise by a client application.
|
Read-Only
|
|
BlockRead.ItemErrorCnt
|
The current number of items that have been successfully added to this group and have data quality other than GOOD. This value is calculated.
|
Read-Only
|
|
BlockRead.ItemErrorCntAlarm
|
Set to TRUE if the current error count is not zero. This value can be alarmed.
|
Read-Only
|
|
BlockRead.ItemErrorCntLast
|
The error count immediately prior to the current error count.
|
Read-Only
|
|
BlockRead.ItemErrorCntLastEnd
|
The last time the error count returned to zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockRead.ItemErrorCntLastStart
|
The last time that the error count changed from zero to non-zero, not including the most recent change to the error count. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockRead.ItemErrorCntStart
|
The time that the error count most recently changed from zero to non-zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockRead.StatsReset
|
Used to reset all statistics during run time.
|
Supervisory, User
|
|
BlockRead.TransactionComplete
|
Set to TRUE when the transaction has completed.
|
Read-Only
|
|
BlockRead.TransactionEnd
|
The time the last transaction ended. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockRead.TransactionsCnt
|
The total number of transactions since the last statistics reset.
|
Read-Only
|
|
BlockRead.TransactionStart
|
The time the last transaction started. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockRead.TransactionStatus
|
Used to indicate the status of the transaction. Valid values are: InActive, Processing, and Completed.
|
Read-Only
|
|
BlockRead.TransactionTimeAvg
|
The average amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockRead.TransactionTimeMax
|
The longest amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockRead.TransactionTimeMin
|
The shortest amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockRead.TransactionTimeoutAlarm
|
Set to TRUE if the transaction timeout has been exceeded.
|
Read-Only
|
|
BlockRead.TransactionTrigger
|
If TRUE, the transaction will be started.
|
Supervisory, User
|
|
BlockWrite.AliasDatabase
|
Used to store pairs of alias attribute names and the corresponding item references.
|
Read-Only
|
|
BlockWrite.ItemCnt
|
The total number of items in the group that are on advise by a client application.
|
Read-Only
|
|
BlockWrite.ItemErrorCnt
|
The current number of items that have been successfully added to this group and have data quality other than GOOD. This value is calculated.
|
Read-Only
|
|
BlockWrite.ItemErrorCntAlarm
|
Set to TRUE if the current error count is not zero. This value can be alarmed.
|
Read-Only
|
|
BlockWrite.ItemErrorCntLast
|
The error count immediately prior to the current error count.
|
Read-Only
|
|
BlockWrite.ItemErrorCntLastEnd
|
The last time the error count returned to zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockWrite.ItemErrorCntLastStart
|
The last time that the error count changed from zero to non-zero, not including the most recent change to the error count. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockWrite.ItemErrorCntStart
|
The time that the error count most recently changed from zero to non-zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockWrite.StatsReset
|
Used to reset all statistics during run time.
|
Supervisory, User
|
|
BlockWrite.TransactionComplete
|
Set to TRUE when the transaction has completed.
|
Read-Only
|
|
BlockWrite.TransactionEnd
|
The time the last transaction ended. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockWrite.TransactionsCnt
|
The total number of transactions since the last statistics reset.
|
Read-Only
|
|
BlockWrite.TransactionStart
|
The time the last transaction started. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
BlockWrite.TransactionStatus
|
Used to indicate the status of the transaction. Valid values are: InActive, Processing, and Completed.
|
Read-Only
|
|
BlockWrite.TransactionTimeAvg
|
The average amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockWrite.TransactionTimeMax
|
The longest amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockWrite.TransactionTimeMin
|
The shortest amount of time required to process this group since the last statistics reset.
|
Read-Only
|
|
BlockWrite.TransactionTimeoutAlarm
|
Set to TRUE if the transaction timeout has been exceeded.
|
Read-Only
|
|
BlockWrite.TransactionTrigger
|
If TRUE, the transaction will be started.
|
Supervisory, User
|
|
ConnectionAlarm
|
Set to TRUE if the OPCClient object can no longer communicate with the OPC Server.
|
Read-Only
|
|
ConnectionStatus
|
The status of the link between the OPCClient object and the OPC DA Server. Valid values: CONNNECTED, DISCONNECTED.
|
Read-Only
|
|
RestartAlarm
|
Set to TRUE if the number of attempts to start the OPC Server has exceeded the allowed maximum within the restart period.
|
Read-Only
|
|
RestartCnt
|
The number of times the OPC DA Server has been restarted during the restart period.
|
Read-Only
|
|
RestartReset
|
If TRUE, the restart count will be set back to zero. The RestartAlarm attribute (if enabled) will be turned off.
|
Supervisory, User
|
|
ScanGroup.Active
|
If the Active attribute is set to TRUE, and the ScanMode attribute is set to Active or ActiveAll, the object attempts to scan all of the data items in the group. If the Active attribute is set to TRUE, and the ScanMode attribute is set to ActiveOnDemand, the object attempts to scan data items in the group individually according to demand. If the Active attribute is set to FALSE, no scanning occurs, regardless of the setting of the ScanMode attribute.
|
Supervisory, User
|
|
ScanGroup.AliasDatabase
|
Used to store pairs of alias attribute names and the corresponding item references.
|
Read-Only
|
|
ScanGroup.ItemCnt
|
The total number of items in the group that are on advise by a client application.
|
Read-Only
|
|
ScanGroup.ItemErrorCnt
|
The current number of items that have been successfully added to this group and have data quality other than GOOD. This value is calculated.
|
Read-Only
|
|
ScanGroup.ItemErrorCntAlarm
|
Set to TRUE if the current error count is not zero. This value can be alarmed.
|
Read-Only
|
|
ScanGroup.ItemErrorCntLast
|
The error count immediately prior to the current error count.
|
Read-Only
|
|
ScanGroup.ItemErrorCntLastEnd
|
The last time the error count returned to zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
ScanGroup.ItemErrorCntLastStart
|
The last time that the error count changed from zero to non-zero, not including the most recent change to the error count. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
ScanGroup.ItemErrorCntStart
|
The time that the error count most recently changed from zero to non-zero. The date format reflects the current locale setting for the operating system.
|
Read-Only
|
|
ScanGroup.ItemUpdateCnt
|
The number of items whose values were updated during the most recent scan cycle.
|
Read-Only
|
|
ScanGroup.PingItem
|
The item quality of this item is checked on each scan to determine the scan group status.
|
Read-Only
|
|
SlowPollInterval
|
The slow poll interval, in milliseconds, in which the OPCClient object periodically retries the connection to the disconnected OPC DAServer after it goes into slow poll mode. This occurs after the "restart attempts" have been reached when certain connectivity problems, such as an unplugged network cable, prevent the OPCClient object from connecting to the OPC Server. When the OPCClient object achieves connectivity again with the OPC Server, it exits the slow poll mode and returns to normal operations. Slow polling is turned off if the value of this attribute is set to 0 (the default). The minimum value for slow poll is 6,000 milliseconds (6 seconds) to account for the time to confirm a broken network connection.
|
Supervisory, User
|
Related Topics
Overview
Run-Time Behavior
Configuration
Alarm Aggregation Attributes
The following attributes are available for all Objects. If alarm aggregation is enabled on the Area, the following attributes aggregate their respective alarm status values for the Area, for all sub-Areas, contained objects, and their descendants assigned to the Area. If alarm aggregation is disabled, these attributes remain at their default values. Alarm aggregation attributes behave similarly to alarm aggregation of individual attributes.
|
Attribute
|
Description
|
Run-Time Access (Supervisory, User, Read-Only, None)
|
|
<Attribute>.AlarmCntsBySeverity
|
Array of counts of all alarms that are in UNACK_ALM, ACK_ALM, or UNACK_RTN states on the object, aggregated by severity levels 1-4.
|
Read-Only
|
|
<Attribute>.AlarmMostUrgentAcked
|
TRUE (default) indicates that no alarms are in the InAlarm state or waiting to be Acked.
A value of TRUE also indicates that the most urgent alarm(s) on the object and its descendants in the InAlarm state have been acknowledged, whether or not they are currently InAlarm.
|
Read-Only
|
|
<Attribute>.AlarmMostUrgentIn Alarm
|
FALSE (default) indicates that no alarms are in the InAlarm state or waiting to be Acked.
A value of FALSE indicates whether the most urgent alarm(s) on the object and its descendants are in the InAlarm state, whether or not they have been acknowledged.
|
Read-Only
|
|
<Attribute>.AlarmMostUrgentMode
|
The AlarmMode of the most urgent alarm(s) on this Object and its descendants. If no alarms are in the InAlarm state or waiting to be Acked, the value is the same as the AlarmMode for the Object.
|
Read-Only
|
|
<Attribute>.AlarmMostUrgent Severity
|
Severity level expressed as an integer 1-4 of the most urgent alarm(s) on the object and its descendants. If no alarm is in the InAlarm state or waiting to be Acked, the value is 0 (zero).
|
Read-Only
|
|
<Attribute>.AlarmMostUrgent Shelved
|
The Shelved status as a Boolean value for the “most urgent” alarm(s) on this Object and its descendants.
A value of FALSE indicates that no alarms have been Shelved for the "most urgent" alarm(s) on this Object and its descendants.
|
Read-Only
|
Related Topics
Run-Time Behavior
Alarm Attributes
If an alarm attribute is enabled, then the following additional alarm attributes become available. None of these attributes can be alarmed.
|
Attribute
|
Description
|
|
<Attribute>.Acked
|
Used to specify whether an alarm has been acknowledged. This attribute is updated when the AckMsg attribute is set. This attribute is always set to FALSE when a new alarm condition is detected (when the InAlarm attribute changes from FALSE to TRUE).
|
|
<Attribute>.AckMsg
|
The operator comment at the time the alarm is acknowledged. Any received text is stored, and the Acked attribute is set to TRUE. Also, the TimeAlarmAcked attribute is set to the current time. The maximum length is 256 characters.
|
|
<Attribute>.AlarmMode
|
The current alarm mode setting. Valid values are: Enable, Disable, Silence.
|
|
<Attribute>.AlarmModeCmd
|
The command to set the alarm mode. Valid values are: Enable, Disable, Silence.
|
|
<Attribute>.Category
|
The category of the alarm. The label of each alarm category is fixed.
|
|
<Attribute>.DescAttrName
|
The description of the alarm. The description must be of type String or InternationalizedString, with a maximum length of 329 characters. The DescAttrName attribute can contain a static alarm description or a reference to another string attribute within the same object containing the alarm description. The reference must be in the form: "me.AttrName". If the reference is invalid, the actual reference string is used for the description. If nothing is supplied for the DescAttrName attribute, the object’s ShortDesc attribute is used at run time.
|
|
<Attribute>.InAlarm
|
The alarm state. This is exactly the same as the attribute in the host primitive that represents the alarm condition, except when the alarm state is disabled, in which case, InAlarm is set to Off, regardless of the actual condition state.
The quality is set during execute to the quality of the attribute, except when the alarm is disabled, in which case the quality is always GOOD.
|
|
<Attribute>.Inhibit
|
If true, the alarm is disabled. This attribute is intended to be written to by a script, a user, or an input feature. Only the individual alarm is disabled. No other alarms are disabled in the same object or in any objects that are assigned to or contained by this object.
|
|
<Attribute>.Priority
|
The value for the urgency of the alarm. Valid values are 1 through 999, with 1 being the most urgent.
|
|
<Attribute>.TimeAlarmAcked
|
The timestamp indicating the last time this alarm was acknowledged. The date format reflects the current locale setting for the operating system.
|
|
<Attribute>.TimeAlarmOff
|
The timestamp indicating the last time this alarm (as represented by the InAlarm attribute) went off. The date format reflects the current locale setting for the operating system.
|
|
<Attribute>.TimeAlarmOn
|
The timestamp indicating the last time this alarm (as represented by the InAlarm attribute) went on. The date format reflects the current locale setting for the operating system.
|
Run-Time Object Attributes
© 2014 Invensys Systems, Inc. All Rights Reserved.
Invensys is a Schneider Electric company
10/17/14