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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
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:
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 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
The following properties are exposed by the TPRI.DataDict class.
|
...
Expand | ||
---|---|---|
| ||
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:
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:
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:
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:
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.
|
...
Expand | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
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.
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 | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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. |
...