Supported device types and versions
Communication line configuration
Communication station configuration
I/O tag configuration
Setting of the right strategy for data reading
DCOM configuration to connect to OPC remote server
Errors and problems
Literature
Changes and modifications
Document revisions
The protocol supports a client side of communication with OPC (OLE for Process Control) HDA (Historical Data Access) servers according to specifications OPC HDA ver. 1.20.
Communication line category: OPC Client.
OPC parameters:
Communication protocol: OPC Historical Data Access 1.20.
This communication protocol does not require any address parameters for a station.
You may configure the following station parameters:
Table 1
Key word | Full name | Meaning | Unit | Default value |
---|---|---|---|---|
Full Debug | It turns the debug records on. It significantly increases the number of information about the communication. We recommend you to activate it only when detecting problems and debugging of communication. | YES/NO | NO | |
Reconnect/Reinitialisation Delay | Delay after failed operations:
| sec | 5 | |
Include Bounds | It sets the parameter "Bounds" (the reading of the threshold limits of interval even if they are beyond the interval) in synchronous/asynchronous reading of "raw" values. | YES/NO | NO | |
Async Mode | It sets an asynchronous mode of activity when data reading. See the chapter Setting of the right strategy for data reading. | YES/NO | NO | |
Maximum number of values | It sets the parameter NumItems when synchronous/asynchronous reading of "raw" values. The implicit value 0 represents the all values in the given interval. See the chapter Setting of the right strategy for data reading. | Positive integer number | 0 | |
Resample Interval | It sets the value of "ResampleInterval" when synchronous/asynchronous reading of "processed" values. See the chapter Setting of the right strategy for data reading. | ddd hh:mi:ss | 60 sec | |
Update Interval | It sets the value of "UpdateInterval" in the callings "AdviseRaw" and "AdviseProcessed". See the chapter Setting of the right strategy for data reading. | ss.mss | 1 sec | |
QERR Value | Integer value of "ERROR" status for conversion to the quaternary input Qi. | 0,1,2,3 | 3 | |
QOFF Value | Integer value of "OFF" status for conversion to the quaternary input Qi. | 0,1,2,3 | 2 | |
QON Value | Integer value of "ON" status for conversion to the quaternary input Qi. | 0,1,2,3 | 1 | |
QTRANS Value | Integer value of "TRANS" status for conversion to the quaternary input Qi. | 0,1,2,3 | 0 | |
Map ExtraData as flag | Mapping of OPC HDA flag of quality Extra Data to the attributes of I/O tag value. | None, FA, FB, FC, FD, FE, FF, FG, FH, FI, FJ, FK, FL, FM, FN, FO, FP | None | |
Map Interpolated as flag | Mapping of OPC HDA flag of quality Interpolated to the attributes of I/O tag value. | |||
Map Raw as flag | Mapping of OPC HDA flag of quality Raw to the attributes of I/O tag value. | |||
Map Calculated as flag | Mapping of OPC HDA flag of quality Calculated to the attributes of I/O tag value. | |||
Map NoBound as flag | Mapping of OPC HDA flag of quality No Bound to the attributes of I/O tag value. | |||
Map NoData as flag | Mapping of OPC HDA flag of quality No Data to the attributes of I/O tag value. | |||
Map DataLost as flag | Mapping of OPC HDA flag of quality Data Lost to the attributes of I/O tag value. | |||
Map Conversion as flag | Mapping of OPC HDA flag of quality Conversion to the attributes of I/O tag value. | |||
Map Partial as flag | Mapping of OPC HDA flag of quality Partial to the attributes of I/O tag value. | |||
Map NonSpecific as flag | Mapping of OPC DA flag of quality Non Specific to the attributes of I/O tag value. | |||
Map LocalOverride as flag | Mapping of OPC DA flag of quality LocalOverride to the attributes of I/O tag value. | |||
Map ConfigError as flag | Mapping of OPC DA flag of quality Config Error to the attributes of I/O tag value. | |||
Map NotConnected as flag | Mapping of OPC DA flag of quality Not Connected to the attributes of I/O tag value. | |||
Map DeviceFailure as flag | Mapping of OPC DA flag of quality Device Failure to the attributes of I/O tag value. | |||
OPCQFSF | Mapping of OPC DA flag of quality Sensor Failure to the attributes of I/O tag value. | |||
Map LastKnown as flag | Mapping of OPC DA flag of quality Last Known to the attributes of I/O tag value. | |||
Map CommFailure as flag | Mapping of OPC DA flag of quality Comm Failure to the attributes of I/O tag value. | |||
Map OutOfService as flag | Mapping of OPC DA flag of quality Out Of Service to the attributes of I/O tag value. | |||
Map WaitingForInitData as flag | Mapping of OPC DA flag of quality Waiting For Initial Data to the attributes of I/O tag value. | |||
Map LastUsable as flag | Mapping of OPC DA flag of quality Last Usable to the attributes of I/O tag value. | |||
Map SensorCal as flag | Mapping of OPC DA flag of quality Sensor Cal to the attributes of I/O tag value. | |||
Map EGUExceeded as flag | Mapping of OPC DA flag of quality EGU Exceeded to the attributes of I/O tag value. | |||
Map SubNormal as flag | Mapping of OPC DA flag of quality Sub Normal to the attributes of I/O tag value. |
I/O tag types: Ai, Ci, Di, Qi, TiA, TiR, TxtI.
The address of I/O tag requires to set "OPC Item ID" (string max. 200 characters).
Other required parameters ("OPC HDA Item Parameters") are:
OPC Historical Data Access is a specification that enables to read the historical data - either "raw" or "processed". Data may be read by the synchronous or asynchronous callings. The asynchronous interface enables also "advise" of required data, i.e. a periodical (see the parameter "Update Interval") sending of the current values from OPC HDA Server by the asynchronous call-back in a client - KOM process. The only required interface, according to specification of OPC HDA, is "SyncRead" for reading of "raw" data synchronously.
In D2000 KOM Process the protocol OPC HDA is implemented in the way that enables as effective as possible reading of archive data, including the updating of the last values, so that it avoids to combine "OPC Historical Access" protocol with "OPC Data Access" one. The tell command GETOLDVAL enables to call the reading of historical data in any time interval. The obtained data are saved to D2000 Archiv if the primary archive value was used for archiving of the particular I/O tag.
The current data may be acquired in two ways:
The parameter "Async Mode" enables to set a fully asynchronous mode, which uses only "AsyncRead" interface. However, the asynchronous mode has some limitations that is why we do not recommend it in these situations:
The protocol OPC Historical Data Access does not support the data writing (the interfaces "SyncUpdate" and "ReadUpdate"). Also the interfaces "SyncAnnotations", "AsyncAnnotations", "Browser" and "Playback" are not supported.
Since the version 7.01.020 rel. 055 and higher D2000 KOM Process supports the acquisition of GUID OPC Servers from ProgID which is placed on remote desktops via DCOM interface with the help of utility OPCENUM (remote browsing). If the utility/windows service OPCENUM has been installed on remote OPC server and the level of access rights enables a remote browsing, the local registration of OPC server is not necessary on the client side. The utility OPCENUM is a part of package "OPC Core Components Redistributable". You can find it on http://www.opcfoundation.org/, or in OPC Server installation .
The registration of OPC Server is not necessary on the OPC client side (D2000 KOM). However, if you decide to register it, you can use one of these two ways:
Always read the instructions for installation OPC Server and check your steps with those stated in the manual.
The connection to the remote OPC Server is subject to the access right control of Windows. From this reason, the same user (together with the password) must be created on both the computer. On the OPC client side the user must be logged. On the OPC Server, the user must have some rights therefore follow these instructions:
Wrong setting of the access rights will probably cause an error (see the chapter "COM/OPC error dump"):
ERROR: ServerProgID caused COM/OPC error 80070005H on CoCreateInstanceEx(CLSCTX_REMOTE_SERVER), Error string : Access is denied.
Track records in the system Event Viewer.
You can avoid this problem, if you add a group "Everyone" to "Launch Permissions" and "Access Permissions". To ensure that the OPC Server will be started under the particular user account (and no under "SYSTEM account"), open "Identity" tab and fill the data for "This user". In this case, you cannot consider OPC Server to be a safe.
OPC Client (D2000 KOM) is not allowed to be started as "Windows service" with parameters "/X1" or "/X2", because then it does not work under the logged on user but under "SYSTEM account". An authentication of the access rights by OPC Server will fail. Use a start parameter "/X4".
Read the instructions to OPC Server again and keep the producer recommendations.
For the user of WindowsXP (or higher) with SP2 we recommend to change the parameter "Network access: Let Everyone permissions apply to anonymous users" to "Enabled" in the settings "Local Security Policy/Security Options".
If the OPC server is configured to run under "The interactive user" on the last tab Identity of the "Properties" dialog window, it may cause the OPC server to be available only when a user is logged on the computer. We recommend to change this setting to "The launching user", "This user", resp. "The system account". |
The error messages, mentioned below, may occur during the start or communication. It is recommended to activate the monitoring of communication in the configuration of line for easier identification of problem. You can choose it from these levels:
When you set "Monitor & Disk" or "Disk", the file "line_name.LOG" occurs in the subdirectory "\TRACE" in application directory on the computer with the running communication process. This file contains all the debug and error messages.
Error: | Unconvertible value for Item: 'ItemID', I/O tag: 'IOTagName'! |
Description: | The received value cannot be converted to suitable value type of I/O tag in D2000. Customize the value type of I/O tag. |
Error: | ShutDown OPC HDA Server : 'ServerProgID' ! |
Description: | OPC server has been stopped correctly in spite of it has the active clients. |
Error: | OPC HDA Server 'ServerProgID' is unavailable ! |
Description: | Remote DCOM OPC Server is unavailable. D2000 KOM (a client) will retry to connect to the server. Check the PC on which OPC Server is installed (whether it is running and properly connected to a local network). |
Error: | Async reading raw data failed, Item: 'ItemID' |
Description: | Error when calling "ReadRaw" of the interface "AsyncRead". Check COM/OPC error dump to gain a detailed information. |
Error: | Sync reading raw data failed, Item: 'ItemID' |
Description: | Error when calling "ReadRaw" of the interface "SyncRead". Check COM/OPC error dump to gain a detailed information. |
Error: | Async reading processed data failed, Item: 'ItemID' |
Description: | Error when calling "ReadProcessed" of the interface "ReadAsync". Check COM/OPC error dump to gain a detailed information. |
Error: | Sync reading of processed data failed, Item: 'ItemID' |
Description: | Error when calling "ReadProcessed" of the interface "ReadSync". Check COM/OPC error dump to gain a detailed information. |
Error: | SetCallBack - FAILED, Server: 'OPCServerProgID'. |
Description: | Error when registering the asynchronous call-back procedure. Check COM/OPC error dump to gain a detailed information. |
Error: | OPCConnectToServer - FAILED, Host: 'ServerName', Server: 'OPCServerProgID'! |
Description: | Failure of connection to OPC Server. Check COM/OPC error dump to gain a detailed information. |
Error: | AsyncAdviseRaw - FAILED, I/O tag: 'IOTagName', ItemID: 'ItemID', Station: 'StationName' |
Description: | Error when calling "AdviseRaw" of the interface "ReadAsync". Check COM/OPC error dump to gain a detailed information. |
Error: | AsyncAdviseProcessed - FAILED, I/O tag: 'IOTagName', ItemID: 'ItemID', Aggregate='Aggregate', Station: 'StationName' |
Description: | Error when calling "AdviseProcessed" of the interface "ReadAsync". Check COM/OPC error dump to gain a detailed information. |
Error: | GetItemHandle - FAILED, I/O tag: 'IOTagName', ItemID: 'ItemID', Station: 'StationName' ! |
Description: | Error when calling "GetItemHandles" of the interface "Server". The registration of required item failed. Since the validation of the item name was successful (the call "ValidateItemIDs"), check a log file of OPC Server. Check COM/OPC error dump to gain a detailed information. |
Error: | ValidateItem - FAILED, I/O tag: 'IOTagName', ItemID: 'ItemID', Station: 'StationName' ! |
Description: | Failure of the calling "ValidateItemIDs" of the interface "Server". There is probably unknown ItemID. Check COM/OPC error dump to gain a detailed information. |
The error messages mentioned in the chapter "Errors and problems" are generated in a higher level of OPC client. The most of the mentioned errors will be described on COM/OPC level. The format of these error messages is as follows:
WARNING/ERROR: ServerProgID caused COM/OPC error ErrorCodeHexadecimal on CallDescription, Error string : ErrorDescription
Example:
ERROR: Matrikon.OPC.Simulation.1 caused COM/OPC error C0040008H on IOPCHDA_Server::ValidateItemIDs('ItemID'), Error string : OPC_E_INVALIDITEMID The item definition doesn't conform to the server's syntax.
These error messages are important for an analyzes of problem. If any problems occur, they will be required by a technical support of Ipesoft company.
The documents OPC Foundation may be found on http://www.opcfoundation.org/.
Other: