Working with the Expression Window
When you have displayed the Expression window, you can use it to create expressions for:
- Animations on Mimics (see Animations in the ClearSCADA Guide to Mimics)
- Custom columns on Trends (see Define the Columns on the Key in the ClearSCADA Guide to Trends)
- Cell contents in Data Grids (see Configuring Data Grids in the ClearSCADA Guide to Core Configuration)
- Field contents in Data Set Rows (see Configuring a Data Set Row in the ClearSCADA Guide to Core Configuration).
The Expression window consists of check boxes, an Expression work area, and a browse button.
- Use the check boxes to enable and disable specific Expression features
- Use the Expression work area to enter the expression.
- Use the browse button to enter OPC tags, OPC Historic tags, colors, and so on.
Some check boxes are specific to the type of item you are configuring. The Expression window for Mimics provides a Hover check box and a Fast Updates check box that are not shown on the standard Expression window.
The image below shows the standard Expression window:
You can use the various features of the Expression window as follows:
- Relative—Defines whether the tag in the expression uses a relative or absolute reference to an item in the database.
The Relative option is only available when the expression consists of exactly one tag. If the check box is selected so that it displays a check mark, the tag uses a relative reference to the item in the database; when the check box is clear, the tag uses an absolute reference. The Relative option is not available when the reference is to a database item in another database.
For more information, see Relative and Absolute References.
- Hover—Defines whether the expression is used as part of a hover animation on a Mimic. This check box is only available when the Expression window is accessed when configuring a Mimic.
The Hover feature allows an object on a Mimic to change its appearance when the cursor is positioned over the object. For example, the Hover feature can be used to change the color of a shape when the cursor is positioned over the shape.
The expression defines the value of the object's property when the cursor is positioned over the object. So, if the expression was used to animate the FillColour property of a shape, and the expression was RGB(255,0,0), positioning the cursor over the shape will cause it to change color to red.
- Fast Updates—Defines whether the tags in the expression are included in the client PC's fast updates group. The fast updates group is a set of values for which the client PC requests more frequent updates. The server sends updates for the values in the fast updates group more frequently than it sends updates for other values.
The Fast Updates feature is only applicable on Mimics on ViewX clients.
Select the Fast Updates check box, the tags are included in the client PC's fast updates group; clear it to exclude the tags from the fast updates group.
Fast updates can place extra demand on system resources and so can affect system performance. For this reason, they should be used sparingly.
- Expression work area—You can type an expression or make adjustments to part of an expression in the Expression work area.
- Browse button—Use the browse button to enter a tag or color in the expression (tags represent the OPC properties of an object). The tag or color is inserted at the current position of the cursor in the expression. If part of the expression is selected, the tag or color replaces the selected expression code.
When you select the browse button, a context sensitive menu is displayed containing one or more of these options:
- OPC Tag—Reference a specific property of an item in any available database. For example, you can reference the CurrentValue property of a database point. For more information, see OPC Tags.
- OPC Historic Tag—Reference a historic tag. For more information, see OPC Historic Tags.
- Historic Calculation Tag—Reference the source point or forecast for a Historic Calculation. For more information, see Historic Calculation Tags.
- Color—Reference a color from the palette or a custom color in your expression. For more information, see RGB.
- <Parameter Name>—Reference a Mimic parameter in an expression. This option only applies to Mimics that have parameters. For a description of how to reference a Mimic parameter, see Mimic Parameters in this guide.
For more information on Mimic parameters, see Mimic Parameters in the ClearSCADA Guide to Mimics.
The context sensitive menu is only displayed if more than one type of expression reference is available. If only one type of expression reference is available, selecting the browse button will cause the relevant tag window to be displayed.