6.1. Animate the Color/Expression of an Object

If you can fill an object with a color or pattern that changes during runtime based on a condition that is specified by an expression.

The number of expressions you can define for an object is limited only by the amount of system memory available.

Open the Expression List Attribute Animation dialog box.

Configure the animation list.

Runtime example.

Open the Expression List Attribute Animation dialog box

  1. Select the object that will be animated.

  1. Open the object's Properties dialog box.

  2. Select Color Animation.

  3. Click Edit in the Expression list section.

The Expression List Attribute Animation dialog box opens.

A first expression is available for configuration.

Configure the animation list

Use available options to configure the animation list.

A

Details

B

Expression list

C

Expression list buttons

 

A

Details

Details that are available depend on the object selected.

Check a detail to enable its configuration selections.

Selections are:

Expression

(Required) Condition required to display selected animation option(s); can include one or more point ID's and mathematical operators.

 

Opens the Edit Expression dialog box to configure the animation expression.

 

Point Id Popup

Line

Creates a border around the object when the expression evaluates to True.

Line selections are:

Style

Color

Width

The selected line displays when the expression evaluates to True.

Fill

Changes the object fill to the selected fill when the expression evaluates to True.

Fill selections are:

Style

Primary color

(Available when a pattern or gradient two colors is selected) Second color

(Available when gradient one color is selected) Brightness

 

Style

Selections (Detailed)

 

No fill

No selections

 

Solid

Primary color

 

Pattern

Opens the Fill Effects dialog box.

Select the Pattern tab.

Options are the same as for any CimEdit object pattern.

 

Gradient

Opens the Fill Effects dialog box.

Select the Gradient tab.

Options are the same as for any CimEdit object gradient.

Text

(Available when the object is a text object or text button.) Checked displays specified text string when the expression evaluates to True.

 

Translate

Checked makes the text available for translation.

 

String

Displays when the expression evaluates to True.

 

Opens a Text box, in which you can enter a longer string.

Your entry will display in the Text String field when you close the Text box. You can scroll to see the entire entry.

Font

Displays the selected font when the expression evaluates to True. Selections are.

Font

Type

Size

Note: If you make the text available for translation make sure that the selected font accommodates the languages in which the string will display.

Arial UNICODE MS can display all languages.

 

Opens the Font dialog box, in which you can select the font, type and size.

Your selections will display in the Font fields when you close the Font dialog box.

Blink

The object alternates the blink configuration with the line/fill configuration to create a blink effect, when the expression evaluates to True.

 

Blink Rate (ms)

Number of milliseconds between blinks.

Options are:

 200

 400

 600

 800

1000

Blink Line

(Enabled when Blink is checked) adds a border around the object when the blink configuration displays. This configuration alternates with the line/fill configuration to create a blink effect.

Selections are line:

Style

Color

Width

Blink Fill

(Enabled when Blink is checked) displays the selected configuration when the blink configuration displays. This configuration alternates with the line/fill configuration to create a blink effect.

Fill selections are:

Style

Primary color

(Available when a pattern or gradient two colors is selected) Second color

(Available when gradient one color is selected) Brightness

 

Style

Selections (Detailed)

 

No fill

No selections

 

Solid

Primary color

 

Pattern

  1. Opens the Fill Effects dialog box.

  2. Select the Pattern tab.

  3. Options are the same as for any CimEdit object pattern.

 

Gradient

  1. Opens the Fill Effects dialog box.

  2. Select the Gradient tab.

  3. Options are the same as for any CimEdit object gradient.

B

Expression list

A list of animation expressions display in the Expression box.

The item order in this list can be changed.

Important: Expressions in this list must be mutually exclusive. It is important to review it thoroughly to make sure there is no overlap or the animation will not work properly. The type of columns in the list depend on what object is selected.

Example

An expression list for a:

Rectangle contains line and fill specifications.

Text object contains text specifications.

During runtime:

  1. The listed expressions are evaluated in the order they display in the list.

  2. The first condition that evaluates as TRUE or unavailable determines the object's color or text string.

  3. If no conditions evaluate to TRUE the display reverts to values configured as placeholders in the Properties dialog box.

C

Expression list buttons

Buttons include:

Saves the expression animation list.

Closes the Expression List Attribute Animation dialog box.

 

The Expression Count on the Color Animation tab will equal the number of expressions configured on the list.

Cancels expression item being configured.

Moves the selected expression item in the list.

A

Up

 

B

Down

Displays a new line at the end of the list to configure a new expression item.

Once the new line is created either the:

Expression must be configured or

Item must be deleted.

Duplicates the selected expression.

Places the duplicate expression at the end of the list.

Important: The duplicate expression must be edited in order to adhere to the requirement that expressions be mutually exclusive.

Deletes the selected expression item.

Runtime Example

A button is configured to change appearance based on its configured expression in the Expression List Attribute Animation dialog box.

  1. The expressions use the following point.

Point ID

Class

TANK750

Integer

  1. Expressions in the list are as follows.

Expressions

AH2(TANK750)

AH1(TANK750)

AL1(TANK750)

AL2(TANK750)

NOT AL(TANK750)

  1. During runtime operators must press specific keys on a keypad based on a TANK750 alarm state.

The following objects contain expression animation to alert operators and insure that they press the correct keys.

Default Configuration

AH2 Configuration

AH2 Blink Configuration

A

Text (text object) reports what keys to press based on the alarm state expression that evaluates to True.

B

Text background (rectangle object) changes color and blinks based on the alarm state expression that evaluates to True.

C

Keys that must be pressed change color when their alarm state expression evaluates to True.

D

Text (text object) that reports the TANK750 point value changes color based on the alarm state expression that evaluates to True.

More information

6. Attribute animation.