beautypg.com

How to use derived tags, Creating a derived tags component – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 631

background image

24

A

DDING

LOGIC

AND

CONTROL

24–3

• •

24

Pla
ceho

lde

r

Form and spreadsheet

In the upper part of the form, provide a name and description for the derived tag.

In the Expression box, create the expression that will determine the derived tag’s value.
You can use the buttons beneath the box to build expressions. For more information, see
Chapter 20, Creating expressions.

Checking the syntax of an expression

In the Derived Tags editor, to verify that the expression you typed uses correct syntax,
click Check Syntax. If the syntax is invalid, an error is shown in the Check Syntax box.

You can check the syntax of an expression at any time while the Derived Tags editor is
open. The syntax is also checked automatically, when you click Accept or OK in the
editor.

How to use derived tags

Here’s an exampleo of how a derived tag can be used. Suppose there are five weight
sensors on a conveyor belt. The tag database contains one tag for each sensor, so the
weight at each point on the conveyor belt is monitored.

If the weight at any point is excessive, FactoryTalk View triggers an alarm. However, if no
individual sensor detects an excessive weight, but the total of all five sensors is too high,
an alarm might be triggered.

To handle this case, you could set up a derived tag to sum the weights of all five sensors.
Then, if this total, which would be the value of the derived tag, is too high, FactoryTalk
View can trigger an alarm.

Creating a derived tags component

You can use any tag to store the result of a derived tag calculation. The tag must already
exist, for example, as an HMI tag (memory or device) or in a data server, before you can
use it as a derived tag.

Writing to a tag whose value is the result of a derived tag expression is not recommended,
because a derived tag is re-evaluated whenever tags in the expression change.

For example, if a derived tag named Tag3 is defined by the expression Tag1 + Tag2, you can set
Tag3 to zero; however, the value of Tag3 will change again, when either Tag1 or Tag2 changes.

Do not create derived tags that depend on the results of other derived tags.

Derived tags processing is not sequential. This means the results of an expression that includes
other derived tags might not occur in the desired scan or order of evaluation. To avoid this, it is
best to put all the required logic in the expression.