Movicon Help on Line - Rel. 11.7.1302
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:
TimeCol: indicates the recording's date and time in GMT
LocalCol: indicates the recording's data and time in local time
MSecCol: indicates the recording's time in milliseconds
UserCol:the name of the user logged in the project will be recorded in this field only when the variable has been changed by that user. (i.e. through a display, the watch window, etc.)
Action Column (ActionCol): indicates from which event the variable was changed, for example from a screen object, a communication driver, watch window or other. This column is also used for other kinds of information as well:
When the Variable being Traced is Structure type, this field will show the name of the Variable member that underwent a change.
If the 'Comment on Trace' property is active, it is used to record the comment entered during the data modification validation phase by the logged-in User
When the variable is changed from the Networking Client project, the IP address of the machine from which the variable was changed will be shown in this field.
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.
BeforeCol: indicates the value just before the variable was modified
AfterCol: indicates the variable's new value
ValueCol: indicates the variable's current value
QualityCol: indicates the variable's quality status
Variable TimeStamp Column(TimeStampCol): indicates the timestamp of when variable was recorded.
Variable Name Column (TagNameCol): indicates the name of the variable. This column will be populated with the variable's name only when a different "Table Name" has been specified that is not null or if the recording of diverse number of variables in the same table has been set (see section on "Recording Diverse Variable in One")
Variable Description Column (TagDescCol): indicates the variable's Description. This column is only populated if the "Add Variable Description Column" property has been enbled in the variable trace options
Variable Group Column (TagGroupNameCol): indicates any group Gruppo that the variable belongs to. This column will only be populated if the "Add Variable Group Column " property has been enbled in the variable trace options
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:
if all the variables sharing the same table are of the same type (all byte or all word or all float types etc.), these three trace table "Value...) coluns will be created with the same variable types.
if the variables sharing the same table are of different types or if at least one of these bing a Bit, String, Array or Structure type (when the whole structure is being traced and not each single member), the three trace table "Value..." fields will be created in String type (nVarChar)
if the variables sharing the same table are of different types, but are all numeric, (byte, word, dword, float or double), the three trace table "Value..." fields will be created in Double type (float 64 bit)
|
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. |