Rockwell Automation FactoryTalk View Machine Edition Users Guide User Manual

Page 470

Advertising
background image

F

ACTORY

T

ALK

V

IEW

M

ACHINE

E

DITION

U

SER

S

G

UIDE

22-12

• •

7. Click Apply.

Example 2: Create an object that changes color as the fill level
changes

This example describes how to create a rectangle object that changes color as the object’s
fill level increases. This example uses a tag called Hopper1\FlourLevel. The tag has a
range of 1 to 100. When the flour level reaches 80, the rectangle blinks between gray and
yellow to warn the operator that the hopper is nearly full. When the flour level reaches 95,
the rectangle blinks between gray and red.

You could use a bar graph object (without animation) to achieve a similar result.

1. Double-click the rectangle to open the Polygon Properties dialog box. Assign these

properties to the rectangle:

In the Back style box, select Solid.

For the Fore color and Back color, select gray.

2. Click OK to close the Polygon Properties dialog box.

3. With the rectangle selected, open the Animation dialog box, and then click the Fill tab.

4. Attach fill animation as follows:

In the Expression box, type Hopper1\FlourLevel (this is the tag that monitors the
fill level).

For Fill Direction, click Up.

5. Click the Color tab, and then attach color animation as follows:

In the Expression box, type Hopper1\FlourLevel (the same tag that was used in the
Fill tab).

Set up the color for the normal state

In the list box, click A. (In the Value box, leave the value as 0.)

For Fill Style, click Solid.

For Line and Fill, click the color box, and then click gray (the same gray used for
the rectangle).

Set up the color for the first warning

In the list box, click B.

Advertising