beautypg.com

Using tag placeholders in commands – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual

Page 648

background image

F

ACTORY

T

ALK

V

IEW

S

ITE

E

DITION

U

SER

S

G

UIDE

A–2

• •

Separate multiple parameters with a space.

Enclose long file names containing spaces with double quotes when the file names are
used as parameters. For example:

Display PID /P“Temperature Loop 1”

Enclose area and component names that contain spaces, or are ambiguous, in double
quotes.

An ambiguous area name is one that is the same as another parameter for a command.
For example, AlarmOn “/H” would turn alarm monitoring on in area H; whereas
AlarmOn /H would turn alarm monitoring on with handshaking, in the current area.

An exclamation mark (!) at the beginning of a new line or immediately after a
semicolon (;) indicates the start of a comment.

Everything between the exclamation mark and the end of the line, or the next
semicolon, is treated as a comment.

If a command accepts wildcard characters, this is noted in the description of the
command in the Help. The wildcard characters are:

*

matches any number of characters, including the backslash (\) and period (.)

?

matches any single character

Using tag placeholders in commands

To replace a tag name with its current value when a command is evaluated, enclose the tag
name in dollar signs ($). This creates a tag placeholder in the command.

When using tag placeholders in commands, keep these points in mind:

Floating point tags can be a maximum of 17 digits long. If the value is longer than
17 digits, it is represented in scientific format.

The maximum command length is 5000 characters. If tag values substituted for
placeholders in a command cause the command to exceed this length, then the
command will be truncated.

Example 1: A macro using tag placeholders in commands

Display Screen$Tag1$

Display $Tag3$$Tag2$

Valve23=Open

In the first two commands, the tag placeholders Tag1, Tag2, and Tag3 are string tags.
When the macro runs, the tags have the values 1, 2, and ‘Screen,’ respectively.