System Model > Variable Tags > Configure Variable Tags > Format Specifiers
Format Specifiers

Format specifiers are keyboard characters that you can use to define the format for a numeric variable. The specifiers that you can use are:

Specifier

Function

Description

#

The number of characters to display

The hash character specifies how far digits display to the right of an animation point, for example:

Format: ####

This will display at least four digits (or spaces) to the right of the animation point. If the number contains more than four digits, the first digit is located at the animation point.

Note: As an alternative to the hash (#) notation, you can use shortform notation.

0

Padding

When a number contains fewer digits than your format specifies, Citect SCADA only displays the meaningful digits. You can use the padding character, zero (0) as the second character in the format string to fill the number with zeros, for example:

Format:#0##

This will display:

0075 for 75

0005 for 5

-

Justification

By default, numeric variables are right-justified (within their field). You can change the default justification by using a minus (-) sign as the second character in the format string, for example:

Format: #-###

.

Decimal notation

To specify decimal notation, use a period (.), for example:

Format: ###.##

In this example, Citect SCADA displays three digits before the decimal point and two digits after. If the variable is 12.3, Citect SCADA displays 12.30.

All numbers are automatically rounded, for example:

12.306 displays as 12.31.

EU

Engineering units

You can specify engineering units (such as %, deg, rpm, M, mm/sec, and so on) when you define a variable tag. To include these units in the format of the number, type EU in the appropriate position.

Format: ####.##EU

Note: If you do not specify an engineering unit for the variable, only the number is displayed (or logged).

S

Exponential notation

To specify exponential notation, include the exponential character (s), for example:

Format: #s###

In this example, Citect SCADA displays the number in exponential notation format, for example: 1.234e+012.

You can combine format specifiers, for example:

Format: #0-###.##EU

This format string displays six digits before the decimal point and two digits after. The number is left justified, padded, and displayed with engineering units (if specified).

Shortform Notation

As an alternative to the hash (#) notation, you can use shortform notation. With shortform notation, you use a number to specify the format of the numeric variable, for example:

Format: 3.2

This format string displays three digits before the decimal point and two digits after. This format string is equivalent to the ###.## format specification. You can also include engineering units with shortform notation, for example:

Format: 6.0EU

This format string displays six digits before the decimal point and no digits after. The number is displayed with engineering units (if specified). This format string is equivalent to the ######EU format specification.

You cannot use padding or left justification with shortform notation.

Note: If the value of a numeric variable is extremely large, it is displayed in exponential notation (for example 1.2345E012). If no format is specified for a variable, the default ####.# (or 4.1) is used.

Published June 2018