Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Tsentry HMI libraries are composed of a set of objects to facilitate the creation and usage of real-time HMI screens on the Tsentry Windows NT/2000/XP platform.

...

Expand
titleOperation

Normally, a TPRI.DataDict object on a user screen is configured as invisible so that it is hidden from the user.  The variable selection form itself is accessed by calling the DoModal(..) function. This form allows the user to graphically navigate through the data dictionary to choose a variable from global common.

 

The top left of this form contains the Global Common Structure Tree.  The root elements in this tree represent each of the available global common, and expanding one of these commons reveals its internal structure.  Single clicking on variable name highlights the variable, while double clicking automatically selects the variable and closes the form.

To the right of the Global Common Structure Tree is the Selected Variable information box.  Once highlighted in the structure tree, the full structure name, element type, and description of the selected variable are displayed.

Below the Selected Variable information box is the Return selection box.  The main edit box here displays the variable name string as it will be returned to the screen.  Normally, this string consists of the fully qualified variable name; however, instead of returning a string representing the variable itself, the user has the option to instead return a string representing some property of the variable.  The following options are available:

 

Name

The variable name itself.

Desc

The variable description (prepends '#' to the variable name).

Min

The specified minimum value of the variable (prepends '<' to the variable name).

Max

The specified maximum value of the variable (prepends '>' to the variable name).

Init

The specified initial value of the variable (prepends '=' to the variable name).

String

Treat character array as a string (prepends '$' to the variable name and removes any trailing square braces '[]' indicating an array)

 

Clicking the accept button closes the form.

The bottom half of the variable selection form allows the user to search through variable names and descriptions for strings.  Typing in the selection string and hitting the enter key activates the search, which fills the list box below with all matching variables.  Single clicking on a found variable locates it in the structure tree and displays its information in the Selected Variable box.  Double clicking on the variable name automatically selects it and closes the variable selection form.  

Tip: The user can search the data dictionary for multiple strings by separating them with spaces in the Search string.  In this case all of the specified words must exist in either the variable name or description in order for the variable to be displayed.

The data dictionary display is initialized by copies of the structure and variable data dictionary initialization files used to initialize the data dictionary for the processes on the control system.  The TPRI.DataDict object looks for these copies hosted on the web server at the locations specified by the VarsFileName and StructFileName properties of the object.  Normally, these copies are made as part of the data dictionary building process on the host.

For more in-depth information about the data dictionary, refer to Data Dictionary [LINK].

Expand
titleProperties

The following properties are exposed by the TPRI.DataDict class.

Property Name

Type

Default Value

Description

VarsFileName

String

"/tsentry/pif/gsmVars.txt"

Name of variable definition file on host web server.

StructFileName

String

"/tsentry/pif/gsmStruct.txt"

Name of structure definition file on host web server

 

...

Expand
titleOperation

At run-time, the TrendCtrl itself is used mainly as a display to provide feedback about the data being trended.  The top two rows of the TrendCtrl object display the dates and times for trended data.  The remaining rows are broken up by axis, with the trended variables shown for each axis.

The information displayed for each variable, in columns from left to right, are:

  • The color of the pen used to trend the variable.  For instance, the PidCom.rtDrift.filtDrift variable above is being plotted in yellow.

  • The label associated with the variable.  Each variable can have an associated label for a sensible description of what is being trended.  If no label is specified this column will instead display the actual name of the variable.

  • Value of the variable at the left cursor.  The value displayed in the first data column (magenta background) is the value of the variable underneath the magenta cursor bar.  If cursors are not being used, this value represents the value of the data at the leftmost edge of the trend graph.  For instance, the left cursor data value for the PidCom.rtDrift.filtDrift variable above is 2.1895e-5.

  • Value of the variable at the right cursor.  The value displayed in the second data column (cyan background) is the value of the variable underneath the cyan cursor bar.  If cursors are not being used, this value represents the value of the data at the rightmost edge of the trend graph.  For instance, the left cursor data value for the PidCom.rtDrift.filtDrift variable above is 3.3646e-4.

  • Difference in values between the left and right cursors.  The value displayed in the third data column (gray background) is equal to the left cursor value minus the right cursor value, useful for easily determining how much a value has changed during some period of time.  For instance, the difference in cursor data values for the PidCom.rtDrift.filtDrift variable above is (2.1895e-5 - 3.3646e-4) = -3.1457e-4.

 

Trends are configured via the Trend Setup form.  This form can be accessed at design-time via the TrendInfo property of the TrendCtrl object or at run-time by calling the TrendSetup() method of the TrendCtrl object.

In the top portion of the form, the user can set various parameters to define the trend graph as a whole:

  • Trend Width: width of the trend graph in seconds, that is, the total amount of time to be displayed on the trend graph.

  • Sampling Period: sampling period for plotted points on the graph, as well as the requested sampling period for trended variables.  The total number of points plotted will equal the Trend Width divided by the Sampling Period.

  • Default Source: trend source to which all trend variables should be assigned when the Set All Variables button is pressed.  This is useful when switching between two historical trend files created from the same trigger.

 

The middle 'Trend Axes' section of the form allows the user to add, delete, and configure each of the trend axes.  Several columns are provided to configure each axis:

  1. The axis label is a descriptive string that will be attached to the axis on the trend graph.

  2. Min specifies the minimum value of the vertical range for this axis.

  3. Max specifies the maximum value of the vertical range for this axis.

  4. The axis percentage specifies what percentage of the vertical extent of the entire trend graph should be used by this particular axis.  If the Normalize Axis Percentages option is selected (see below), these percentages will be automatically calculated and each axis will be given an equal amount.  If the Normalize Axis Percentages option is disabled, the user can individually configure each axis; however, the total percentage used by all activated axes must equal 100%.

The parameters for a given axis can be modified in one of two methods.  First, the user can highlight the desired axis and single-left-click on the parameter to be modified; within a few moments the field will become editable and the user can make the appropriate selection.  Alternatively, once highlighting the desired axis the user can right click anywhere on the axis entry to display a popup menu of options.  This menu contains several commands to edit the various axis properties.

This popup menu also presents commands to insert and delete an axis and to enable or disable the Normalize Axis Percentages option mentioned above.

 

The bottom ‘Trend Variables’ section of the form allows the user to configure each individual variable for trending.  Variables are divided up according to the axis with which they are associated.  Several columns are provided to configure each variable:

  1. The Source specifies the trend source which is responsible for providing the data for the given variable.

  2. The Variable specifies the name of the variable within the trend source.

  3. The Label is a descriptive string associated with the trend variable.  If set, this label is displayed on the TrendCtrl object instead of the actual variable name.

  4. The Color specifies the pen color to be used when plotting this trend variable.

  5. The Line Type specifies the how the trend should be plotted.  Available options include a variety of thin, medium, and thick pens drawing a solid, dashed, or dotted line.

Like the trend axis parameter, the parameters for a given trend variable can be modified in one of two methods.  First, the user can highlight the desired variable and single-left-click on the parameter to be modified; within a few moments the field will become editable and the user can make the appropriate selection.  Alternatively, once highlighting the desired axis the user can right click anywhere on the variable entry to display a popup menu of options.  This menu contains several commands to edit the various variable properties.

This popup menu also presents commands to insert, delete, copy, and paste a variable or group of variables.

 

When editing the Source for a given variable, the user may either simply type in the appropriate source or alternatively click on the asterisk (*) to bring up the Select Trend Source dialog.  This dialog allows the user to select from the available trend sources.  It is described in detail in the TrendSrcSelect [LINK] section of this manual.

 

Similarly, when editing the Variable name for a given variable, the user may either simply type in the appropriate name or alternatively click on the asterisk (*) to bring up the Data Dictionary [LINK] dialog.  This dialog allows the user to browse through the available data dictionaries to find the appropriate variable in the desired source.  It is described in detail in the Data Dictionary section of this manual.  Note that if the data dictionary is used to select a variable, and a variable is chosen from a data dictionary that is different from the currently selected trend source, the trend source for the current variable will be updated to the new source accordingly.

 

Finally, there are several buttons in the lower right corner of the Trend Setup form.

  • ‘OK’ accepts all changes and closes the Trend Setup form.

  • ‘Cancel’ exits the Trend Setup form without saving the changes.

...

Expand
titleOverview

The TPRI.TrendCom object is responsible for automating communications for all trends on a screen.  On initialization it searches for any TrendCtrl objects on the screen and begins to request data on their behalf from the host system.  As responses are received, the TrendCom object feeds the data back to the appropriate TPRI.TrendCtrl [LINK] objects.

Expand
titleOperation

In most cases, all operation of the TPRI.TrendCom object is fully automated by the TPRI.BaseScreen [LINK] framework. While connected to the data host, the TrendCom object will display green and indicate the date/time of the most recent trend data response from the host.  Before the initial connection and any time the TrendCom object disconnects from the host, the display will turn orange and will indicate the date/time of the most recent connection attempt; the TrendCom object should attempt to reconnect every 3-5 seconds.  Finally, there are three cases in which the TrendCom object will turn red:

If the TrendCom object has not been supplied a hostName to which it should connect, the object will turn red and display a message indicating that there is no host specified.

If the TrendCom object is unable to find any TrendCtrl objects on the screen or none of the TrendCtrl object specify any variables to be trended, the object will turn red and display a message indicating that there are no trend items configured.

If the TrendCom object encounters an unrecoverable error the object will turn red and display an error indication.

...

Expand
titleOperation

The TPRI.TriggerEd object acts purely as a run-time user interface for interacting with the historical trend system.  The buttons along the top row of the screen allow the user to create a New trigger definition, Load an existing trigger, Save the current trigger, Activate the current trigger, or Deactivate the current trigger.

Below the row of buttons are a set of fields to configure general information about the trigger.

Trigger Name

Name of the trigger

Pre-Trigger Time

The number of seconds prior to the beginning of the event that should be recorded in the historical data file.

Post-Trigger Time

The number of second after the end of the event that should be recorded in the historical data file.

Max Trend Time

Maximum number of seconds of data to record into a single file.

Description

Description of trigger file to store with the historical trend files.

Below the general information fields are two columns of variables.  The left column of Trigger Variables allows for specification of all variables that define the trigger.  Each line in this list defines a Boolean operation; the trigger is considered active when every one of these operations is satisfied.  Each operation is defined by a variable name, a comparison operator and comparison value selected; hence the operation is considered true when the associated variable on the host system meets the specified criterion.  In order to facilitate variable selection, each of the variable name entry fields are TPRI.DDVarSelect [LINK] objects; clicking on the '*' in the upper right hand corner of the text box will load the data dictionary browser form.

The right column of variables, the Trend Variables, specifies each of the variables that should be recorded while the trigger is considered active.  Like the Trigger Variable names, the data dictionary browser can be loaded by pressing the '*' in the upper right hand corner of any of the Trend Variable entry text boxes.

...

Expand
titleO-Modifying a Rule Configuration

Parameter values can be modified by single-left-clicking on the parameter value, which will bring up an edit box that allows for text entry.  

Pressing the enter key while editing or clicking outside of the edit box will validate the user entry; if it is valid the rule parameter will be changed, while if there is a problem the user will be prompted and asked to correct the value.

Editing a criteria or action value brings up a special text edit box that provides access to the Data Dictionary [LINK] by right clicking in the edit box.

Once any rule parameter has been modified from its original value, the rule name displayed as the label on the root node is appended with an asterisk to indicate that it has been modified.

For more in-depth information about the data dictionary, refer to Data Dictionary [LINK].

Expand
titleO-Saving a Rule

A rule can be saved to a file on disk and stored for later reference by choosing either of the first two save options from the popup menu.  The Save Rule option simply saves the rule to its current file, while the Save Rule As... option saves the rule under a different name or into a different folder.

Before the rule can be saved to disk, though, it must be validated to ensure that each of its parameters is formatted correctly and contains valid data.  If validation is not successful the user will be prompted with a list of problems and the rule display will be populated with a red Local Errors node that contains a duplicate of this list.

For instance, an improperly formatted VariableCondition statement containing unmatched parentheses causes a fatal validation error because the condition cannot be properly parsed.  On the other hand, a properly formatted VariableCondition statement that contains a variable name that cannot be located in the data dictionary only causes a non-fatal validation warning, as this rule can still be properly parsed by the rules manager process.

If only validation warnings are encountered, and there are no fatal validation errors, the user has the option of continuing with the save process or canceling the save to fix the problems; however, if any fatal errors are encountered the save cannot continue.

If a rule is currently active on the host, it can only be saved to the host share under its current name by re-activating it at the same time (see below).  The user may however choose to save the rule to a different folder under the same name.

...