Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

...

Communication line category: OPC Client.

OPC parameters:

  • OPC Host: It is required only for "Remote" access, i.e. it is defined only for OPC server type "Remote" (string max. 50 characters). OPC HDA Server must be installed on a computer. You can se the names according to UNC (Universal Naming Convention) (e.g. "\\server" or "server"), DNS domain names (e.g. "domain.com", "example.company.com") or IP address ("196.54.23.113").
  • Backup Host: It is required only for "Remote" access. It is a backup OPC host. If it is defined, D2000 KOM tries to establish a communication alternately with OPC Host and Backup Host after failure of communication.
  • OPC Server: A name (ProgID) of OPC server (string max. 50 characters).
  • Server Type: "InProc", "Local" or "Remote".

Kotva
komunikacna_stanica
komunikacna_stanica
Communication station configuration

...

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 wordFull nameMeaningUnitDefault value
Kotva
fd
fd
FULL_DEBUG
Full DebugIt 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/NONO
Kotva
rcd
rcd
RCD
Reconnect/Reinitialisation DelayDelay after failed operations:


  • creating of items GetItemHandles,
  • reconnection to OPC HDA Server after it failed, was stopped or disconnected via network,
  • creating of items after reconnection to OPC HDA Server.
sec5
Kotva
bnds
bnds
BNDS
Include BoundsIt 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/NONO
Kotva
asm
asm
ASM
Async ModeIt sets an asynchronous mode of activity when data reading. See the chapter Setting of the right strategy for data reading.YES/NONO
Kotva
nval
nval
NVAL
Maximum number of valuesIt 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 number0
Kotva
rintr
rintr
RINTR
Resample IntervalIt 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:ss60 sec
Kotva
uintr
uintr
UINTR
Update IntervalIt sets the value of "UpdateInterval" in the callings "AdviseRaw" and "AdviseProcessed". See the chapter Setting of the right strategy for data reading.ss.mss1 sec
Kotva
qerr
qerr
QERR
QERR ValueInteger value of "ERROR" status for conversion to the quaternary input Qi.0,1,2,33
Kotva
qoff
qoff
QOFF
QOFF ValueInteger value of "OFF" status for conversion to the quaternary input Qi.0,1,2,32
Kotva
qon
qon
QON
QON ValueInteger value of "ON" status for conversion to the quaternary input Qi.0,1,2,31
Kotva
qtrans
qtrans
QTRANS
QTRANS ValueInteger value of "TRANS" status for conversion to the quaternary input Qi.0,1,2,30
Kotva
f_ed
f_ed
OPCHQED
Map ExtraData as flagMapping 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, FPNone
Kotva
f_ip
f_ip
OPCHQIN
Map Interpolated as flagMapping of OPC HDA flag of quality Interpolated to the attributes of I/O tag value.
Kotva
f_ra
f_ra
OPCHQRA
Map Raw as flagMapping of OPC HDA flag of quality Raw to the attributes of I/O tag value.
Kotva
f_ca
f_ca
OPCHQCA
Map Calculated as flagMapping of OPC HDA flag of quality Calculated to the attributes of I/O tag value.
Kotva
f_nb
f_nb
OPCHQNB
Map NoBound as flagMapping of OPC HDA flag of quality No Bound to the attributes of I/O tag value.
Kotva
f_nd
f_nd
OPCHQND
Map NoData as flagMapping of OPC HDA flag of quality No Data to the attributes of I/O tag value.
Kotva
f_dl
f_dl
OPCHQDL
Map DataLost as flagMapping of OPC HDA flag of quality Data Lost to the attributes of I/O tag value.
Kotva
f_co
f_co
OPCHQCO
Map Conversion as flagMapping of OPC HDA flag of quality Conversion to the attributes of I/O tag value.
Kotva
f_pa
f_pa
OPCHQPA
Map Partial as flagMapping of OPC HDA flag of quality Partial to the attributes of I/O tag value.
Kotva
f_ns
f_ns
OPCQFNS
Map NonSpecific as flagMapping of OPC DA flag of quality Non Specific to the attributes of I/O tag value.
Kotva
f_lo
f_lo
OPCQFLO
Map LocalOverride as flagMapping of OPC DA flag of quality LocalOverride to the attributes of I/O tag value.
Kotva
f_ce
f_ce
OPCQFCE
Map ConfigError as flagMapping of OPC DA flag of quality Config Error to the attributes of I/O tag value.
Kotva
f_nc
f_nc
OPCQFNC
Map NotConnected as flagMapping of OPC DA flag of quality Not Connected to the attributes of I/O tag value.
Kotva
f_df
f_df
OPCQFDF
Map DeviceFailure as flagMapping of OPC DA flag of quality Device Failure to the attributes of I/O tag value.
OPCQFSF
Kotva
f_sf
f_sf
Map SensorFailure as flag
Mapping of OPC DA flag of quality Sensor Failure to the attributes of I/O tag value.
Kotva
f_lk
f_lk
OPCQFLK
Map LastKnown as flagMapping of OPC DA flag of quality Last Known to the attributes of I/O tag value.
Kotva
f_cf
f_cf
OPCQFCF
Map CommFailure as flagMapping of OPC DA flag of quality Comm Failure to the attributes of I/O tag value.
Kotva
f_os
f_os
OPCQFOOS
Map OutOfService as flagMapping of OPC DA flag of quality Out Of Service to the attributes of I/O tag value.
Kotva
f_wi
f_wi
OPCQFWID
Map WaitingForInitData as flagMapping of OPC DA flag of quality Waiting For Initial Data to the attributes of I/O tag value.
Kotva
f_lu
f_lu
OPCQFLU
Map LastUsable as flagMapping of OPC DA flag of quality Last Usable to the attributes of I/O tag value.
Kotva
f_sc
f_sc
OPCQFSC
Map SensorCal as flagMapping of OPC DA flag of quality Sensor Cal to the attributes of I/O tag value.
Kotva
f_ee
f_ee
OPCQFEGUE
Map EGUExceeded as flagMapping of OPC DA flag of quality EGU Exceeded to the attributes of I/O tag value.
Kotva
f_sn
f_sn
OPCQFSN
Map SubNormal as flagMapping of OPC DA flag of quality Sub Normal to the attributes of I/O tag value.

Kotva
merany_bod
merany_bod
I/O tag configuration

...

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:

  • The selection between "Raw" and "Processed" type of value which is read.
  • If you choose "Processed", then set also "Aggregate".
  • The option "Async Advise" to permit the asynchronous continuous data acquisition.

...

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:

  1. Minimalist:
    It uses only the synchronous interface "SyncRead". According to the setting of station time parameters, the functions "ReadRaw" and "ReadProcessed" are called periodically. The required interval of values starts from the time of last valid value up to current time. If several values have been received in given interval, the last value with the latest time stamp is considered to be a current value. The other values are sent as "old" values to the server and are stored to the D2000 Archiv.
  2. Advise:
    It uses the functions of asynchronous interface "AsyncRead", "AdviseRaw" and "AdviseProcessed". OPC HDA Server sends the last valid data of "raw" or "processed" items in the period which is defined in the parameter "Update Interval". If any new value is not in the defined interval, OPC HDA Server returns the flag of quality "No Data".

...

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".

Info
titleNote about SIMATIC NET and possibly other OPC servers

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".

Kotva
chyby
chyby
Errors and problems

...

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.

...