Variable Tracing (Audit Trail)

Variable Tracing is a Movicon functionality which allows you to historically log the behaviour of variables by recording on database files or text file every change taken place and the cause which changed the variables' values. This is done to keep track of the values which the variable changes to during a process run and the causes which modify the variables' values.

 

By enabling this functionality, Movicon will monitor the desired variable value internally and each single change of the value contained in the variable or change to its quality will prompt Movicon to record these events in the Database file or enabled test file for this purpose.  The file containing the Variable trace information will be created automatically by Movicon in the project's  "DATA" folder with the name of  "ProjectName_TraceDB.mdb" in Ms Access format or VariableName.dat" in text format.  If using another type of databases, such as the SQL Server, the variable table will be created in the database specified in the DSN settings. However you can customize the file name and ODBC link through the "Real Time DB Trace DB Settings".

of the 'Real Time DB' resource. After which a table for every variable enabled with the Tracer will be created in the Database. Therefore for each variable enabled with the Tracer Option a Table will be generated inside the Database to contain a Record for each variation endured by the variable, with a number of columns which report the following information:

 

This happens when the Client notifies the Server directly of the value change of the variable in question. If the variable changes, for example, due to invoking a script that is running on the Server, the Client’s IP address will now be shown.  The traceability of the IP address is not managed when the change is performed on the Web Client side or from a Secondary Server in redundancy mode.

 

To enable this functionality, you need to set the "Variable Trace Options Proprieties" through the variable's Property Window. To enable the Tracer function in more than one variable all at once, just execute a multiple selection of the required variables in the 'Variable List (Tags)' list and enable the "Variable Trace Options Proprieties" through the 'Property Window' which will be activated in all the selected variables.

 

In the event that the operation to modify the value of the Variable under Trace or Trace with Comment requires a 'signature' for First or Second Level Validation, the User or Users of the Level Validator are recorded in the System Log (and not in the Trace Table), whether the Level Validation occurs directly from a Server session or a Network Client session. This is because the Level Validation operation is always carried out on the Server side.

 

Array Variable Trace

The variable trace functions are also supported for Array variables.  In this case, the table's "ActionCol will report the number of Array elements that have been changed and the values relating to the elements' will be reported inthe "Value..." column.  In cased where the Array variable is modified by a Network client, the value of the whold Array represented as Array byte will be reported in the Server trace table's 'Value..." column.

 

Structure Variable Trace

The variable trace functions are also supported for Structure type variables and for each of their Members.

If the Trace property is enabled at Structure variable level, the name of the modified Structure Member will be indicated in the table's "ActionCol"and the relating member values will be indicated in the "Value..." column.  In cases where the Structure variable is modified by a Network Client, the value of the whole Structure represented as array byte will be indicated in the "value..." column.

If the Trace property is enabled for each single Structure Member, they will be recorded as 'simple' variables in the table, with each Member having  its own table.

 

In cases in which the Trace property is enabled both in the Structure Variable and in each single Member, the Trace will only be managed for the Structure as a whole ignoring the trace for each of its single members.

 

When the Trace property is enabled at Structure variable level, changes to the variable's quality will only be traced for the structure and not each of its members.

 

Recording diverse number of Variables in one

Normally each variable to be traced is created a table with its name.  By using a variable's  "Table Name" trace  option you can give the table a custom name which is different from the variable's.  In addition if the same  "Table Name" is assigned to a diverse number of variables being traced, the traced  data of these variables will all be recorded in the same table. In this case the "TagNameCol" column will indicate the name of the variable the record has been entered for.

In cases where the trace of diverse number of variables has been enabled in the same table and these variables are of different types, the three table fields for the "ValueBeforeCol", "ValueCol" and "ValueAfterCol" will be created with data type influenced by the following conditions:

 

 

When a variable is "Bit" type, the three trace table "ValueBeforeCol", "ValueCol" and "ValueAfterCol" fields will be created in "String" type.

 

 

Displaying Trace Data

You can display Trace data in table formats through the appropriated TraceDB Window which can be inserted into any project screen. The operator can use this window to verify values which have been recorded for each variable enabled with the tracer.

 

A TraceDB Window can be dedicated to displaying remote data from a Server connected in network through the Networking facilities.

 

 

See Also