String embedded variable syntax, String embedded variable syntax -4 – Rockwell Automation FactoryTalk View Machine Edition Users Guide User Manual

Page 502

Advertising
background image

F

ACTORY

T

ALK

V

IEW

M

ACHINE

E

DITION

U

SER

S

G

UIDE

24-4

• •

Tag_name is the tag to show; you can also type a literal number or tag placeholder here.

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

# indicates the number of decimal places.

Examples: Numeric embedded variable syntax

To show the current value of a tag called Oven_temp, with 3 digits, no decimal places, and
no fill character, type this:

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

To show the constant 48, with 3 decimal places and 2 zeroes to the left of the number (for
a total length of 8 digits including the decimal), type this:

/*LN:8 48 ZEROFILL DP:3*/

At run time the numeric embedded variable would look like this: 0048.000.

String embedded variable syntax

Use string embedded variables to insert string tag values into captions, title bars, and
messages.

You can also insert “literal” strings of static text. For example, you can type a word or
phrase, a tag placeholder, or a number. To control how constant numbers are shown, use a
literal numeric variable rather than a string variable.

String embedded variables use this syntax:

/*LS:-# Tag_name SHOWSTAR*/

where

L (optional) indicates it is a literal (static) string. This symbol prevents a tag read. If you
type a tag placeholder for the Tag_name, the value of the placeholder is substituted from
the parameter file or global object parameter definition. The value cannot contain spaces.

S indicates it’s a string embedded variable.

- (optional). A minus sign (-) before the # indicates that if the string is longer than the
fixed number of characters, the right-most characters will be shown.

# indicates the number of characters if you select a fixed number of characters; type 0 if
you don’t want to use a fixed number.

Advertising