Example: numeric embedded variable using a tag – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 572

Advertising
background image

F

ACTORY

T

ALK

V

IEW

S

ITE

E

DITION

U

SER

S

G

UIDE

21–4

• •

In the Numeric Variable dialog box, select the Tag option to show the value of the
specified tag (or tag placeholder) in the embedded variable at run time.

Select the Literal number option, to show the number you type in the dialog box, or the
parameter value that replaces the tag placeholder.

Formatting options (Number of digits, Decimal places, Fill left with) apply to either a
tag value or a literal number. For example, if you type the literal number 9999, and select
2 decimal places, at run time the number will show as 99.99.

For details about options in the Numeric Variable dialog box, click Help.

For information about how embedded variables are updated at run time, see page 21-10.

Syntax for numeric embedded variables that use a tag value

Numeric embedded variables that use a tag value use this syntax:

/*N:# Tag_name Fill_character DP:#*/

where

N indicates that it is a numeric embedded variable.

# indicates the number of digits.

Tag_name specifies which numeric tag’s value to display.

You can specify a tag placeholder instead of a tag name.

Fill_character is the fill character: NOFILL, ZEROFILL, or SPACEFILL.

# indicates the number of decimal places.

Example: Numeric embedded variable using a tag

At run time, the numeric embedded variable

/*N:3 Oven_temp NOFILL DP:0*/

would show the current value of an analog tag called Oven_temp, with 3 digits, no
decimal places, and no fill characters.

Syntax for numeric embedded variables that use a literal number

Numeric embedded variables that use literal numbers use this syntax:

/*LN:# ### Fill_character DP:#*/

Advertising