Porovnávané verzie

Kľúč

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

Note: The D2000 Replay utility is obsolete. It has been replaced by the recording/replaying of the communication directly by the D2000 KOM process (see START_RECORD/STOP_RECORD and START_REPLAY/STOP_REPLAY commands) or by a transfer of live data from the production system via a transparent gateway.

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 process that allows to set setting 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

...

Declarationreplay[/H] replayDSN [start_time]
Parameters


/HInitial values of I/O tags will be sent at the beginning of the simulation (if the parameter /H was also used for the Arc2Rpl utility).
replayDSNDSN (Distinguished Source Name) of the Replay database generated by the Arc2Rpl utility.
start_timeOptional simulation time. If it is not defined, the values of I/O tags from the Replay database will be read since the current time, that is detected by the D2000 Replay process from D2000 Server (i.e. before running the D2000 system, it is necessary to set the time and date of the computer with D2000 Server to the period, values within which that are stored in the database). If the parameter is defined, the values from the Replay database will be read since this defined time. The value of Delta - difference between the current time and the time of the first value read from the Replay database - will be added to the timestamps.
Example: Process D2000 Replay is run using the parameter start_time "2004-01-01 10:00", the current time is "2004-01-30 11:00". Process D2000 Replay will add the value of 29 days and 1 hour to the times of values read.


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.

Descriptionreplay 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>

replay /Wreplay1 myRepl1 "2004-01-15 10:55"
replay /Wreplay2 myRepl2 "2004-01-15 10:55"

Kotva
arc2rpl
arc2rpl
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 tagtags 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 an Object type that contains the reference to an I/O tag).

To run the Arc2Rpl utility

...

Declarationarc2rpl [/H] archive replay sysCfg [start_time [end_time]]
Parameters


/HIn the Replay database (in the RPL_HIST table) there are stored last values of I/O tags before start_time. The values are used by the Replay as initial values.
archiveDSN (distinguished source name) of archive database (by default, ApplicationName.Archiv).
replayDSN of Replay database.
sysCfgDSN of configuration database of the application (by default, ApplicationName.Syscfg).
start_timeOptional parameter. Start time for reading the values of I/O tags from the archive. If it is not defined, all the archive contents will be converted.
end_timeOptional parameter.
End
The end time for reading the values of I/O tags from the archive. If it is not defined, the archive since either start_time or all the archive contents will be converted.


NoteTime and date format can depend on the ODBC driver used, the example above is functional for Sybase SQL Anywhere database.
DescriptionAfter launching, the Arc2Rpl utility, except screen output, also generates the Arc2Rpl.log file placed in the directory, where the utility is placed in.
Examplearc2rpl 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.

...