Numeric embedded variables, String embedded variables, Time and date embedded variables – Rockwell Automation FactoryTalk View Site Edition Users Guide User Manual
Page 577
21
•
C
REATING
EMBEDDED VARIABLES
21–9
•
•
•
• •
21
•
Pla
ceho
lde
r
Numeric embedded variables
For numeric embedded variables that use tag values, how the value is shown depends on
whether the data type is integer or floating-point: integer values are shown as they are;
floating-point values are rounded to fit the number of digits specified for the variable.
For example, if 6 is the number or digits specified, the floating point value 1234.56 is
rounded to 1234.6, and the value 1234.44 is rounded to 1234.4. The decimal point
counts as one of the digits. If the value is negative, the minus sign also counts as a digit.
If the floating-point value, including a decimal point and a minus sign, contains more
digits than specified for the variable, the numeric variable is replaced with asterisks (*).
Number formats
Numeric embedded variables use the number format you set up on the run-time computer.
For example, if the run-time computer is set up to use a comma for the decimal symbol,
the numeric variable will also use a comma for the decimal symbol.
String embedded variables
For string embedded variables that do not use a fixed number of characters, the entire tag
value or literal string is shown, unless a null character ( ? ) is read. Nothing after a null
character is shown.
For string embedded variables that do use a fixed number of characters, the entire tag
value or literal string is shown up to the number of characters specified, unless a null
character ( ? ) is read. Nothing after a null character is shown.
If necessary, spaces are used to make up the specified number of characters.
By default, string variables that use a fixed number of characters show the characters from
left to right. To show characters from right to left, in the String Variable dialog box,
select the check box, Right-most characters in string are shown.
If the string is longer than the width of the field it is embedded in, you can also specify
whether asterisks ( * ) are shown at run time.
Time and date embedded variables
For embedded variables that show both the time and the date, a space is placed between
the time and date when the embedded variable is shown at run time.
Null characters have a hex value of 0, and indicate the end of a string. A null character does not
add to the actual length of the string.