Process D2000 Replay is an auxiliary process used as a substitution of process D2000 KOM for the data simulation of I/O tags. Unlike the process D2000 KOM that allows to set individual stations to the simulation mode, the process D2000 Replay works with real data acquired from the archive database and can be used for e.g. replaying D2000 system reactions to particular input data and further debugging the application with real data. Of course, it is necessary to archive as many I/O tags as possible.
Before use of process D2000 Replay, all the archive data (or a part) must be converted to the Replay database using the Arc2Rpl utility.
To run the D2000 Replay process
Declaration | replay[/H] replayDSN [start_time] |
||||||
Parameters |
|
||||||
Note |
Time and date format may depend on the ODBC driver used, the example above is functional for Sybase SQL Anywhere database. Except the parameters described above, the process D2000 Replay also supports other standard parameters for D2000 processes such as /S, /DP, /F, /TP and others. |
||||||
Description |
replay myRepl1 replay /SsrvD2 /DP /H myRepl1 "2004-01-15 10:55"
You can also run several D2000 Replay processes - each of them reads the values of I/O tags from
other Replay database. In that case, you must run each of the
processes using a different
parameter /W<Workstation> |
Arc2Rpl utility
The Arc2Rpl utility is used for data conversion from the archive to the Replay database.
The utility reads the values of all I/O tag from the archive and then it saves them to the Replay database. While performing this task, it reads the I/O tags archived directly (in the configuration of historical value, there is defined an object of I/O tag type) as well as indirectly (using structures - in the configuration of historical value, there is a definition of a structure item of Object type that contains the reference to an I/O tag).
To run the Arc2Rpl utility
Declaration | arc2rpl [/H] archive replay sysCfg [start_time [end_time]] |
||||||||||||
Parameters |
|
||||||||||||
Note | Time and date format can depend on the ODBC driver used, the example above is functional for Sybase SQL Anywhere database. | ||||||||||||
Description | After launching, the Arc2Rpl utility, except screen output, also generates the Arc2Rpl.log file placed in the directory, where the utility is placed in. | ||||||||||||
Example |
arc2rpl Test.Archiv myRepl1 Test.Syscfg arc2rpl Test.Archiv /H myRepl2 Test.Syscfg "2004-01-15 10:55" arc2rpl Test.Archiv myRepl3 Test.Syscfg "2004-01-15 10:55" "2004-01-19" |
Replay database structure
An empty Replay database is placed in the directory D2000.e60\Templates\ as the Sybase database rpltemplate.db. The Replay database contains the tables RPL_DATA (time indexed values) and RPL_HIST (initial values) with the following columns (listed for the possibility to create a Replay database working on other database servers):
- ID - integer
- CAS - timestamp
- VALUE - double
- STATUS - integer
- FLAGS - integer
In the table RPL_DATA an index on the column CAS is created, in the table RPL_HIST, no index is created. There is no unique index for the table RPL_DATA, so when you run the utility several times the table may contain identical values of I/O tags.
Related pages:
0 komentárov