8. Text Value Animation

This task describes:

  • Text value animation overview
  • Text button text configuration
  • Text object text configuration

Text Value Animation Overview

You can select text on a text button or a text object or text ??to:

  • Display current CIMPLICITY point, variable and expression values
  • Set CIMPLICITY point values.

The entry options are the same for each.

Text Button Text Configuration

Select Text Button in a Properties dialog box. Entries in the Display value box direct the animation.

Text Object Text Configuration

Select Text in a Properties dialog box.

Entries in the Display value box direct the animation.

A Expression
B Data entry type
C Confirmed
D Translate result value
E Display Format
A Expression

An expression can include one or more CIMPLICITY Point IDs combined with logical or arithmetic operators.

B Data entry type

The Data entry type check box contains options for displaying the expression, variable, or point in CimView.

The options are:

  • Read only expression: Select this option to display an expression value in the read-only format during run time in CimView.
  • Read write point: Select this option to display a point value and modify text inline during run time in CimView. After the inline text is modified, a setpoint operation is performed.
  • Read write variable: Select this option to display a variable value and modify text inline during run time in CimView. After the inline text is modified, the variable is assigned a new value
C Confirmed

If you select Confirmed when the Data entry type is set to Read write point or Read write variable, a confirmation message appears during run time before the accompanying action is performed. This allows you to cancel the setpoint or variable write action.

D Translate result value

When you select the Translate result valuecheck box,known text values including literal and enumeration point values will be emitted to a selected CIMPLICITY Language Mapper file.

The value can be translated or revised for selected languages in the CIMPLICITY Language Mapper file. The translation or revised text is displayed in CimView when the assigned language is selected.

For more information on translation, see Translation.

Note: The Translate result value check box is disabled when the Data entry type is set to Read write point or Read write variable.
E Display format

Options for the ??format that the expression value displays in on the CimEdit screen are available in the Display format drop-down list.

  • Configured
  • General
  • Custom
  • Integer
  • Real
  • Text
  • Time (Absolute, Seconds
  • Time (Absolute, Sub Seconds)
  • Time (Relative, Seconds)
  • Time (Relative, Sub Seconds)

Configured

Settings that are entered on the General and View tabs in the Point Properties dialog box are used as the display format for point values in CimView, when you select Configured in CimEdit.

A width is specified in the Point Properties dialog box. This specification does not cause a value to be truncated. If the number of characters in the output value is greater than the specified width, or if a width is not given, all characters of the value are printed (subject to the precision specification).

If the number of characters in the output value is less than the specified width, blanks are added to the left or right of the values until the minimum width is reached. The blanks' position depends on whether the flag (for left alignment) is specified. If the width is prefixed with 0, zeros are added until the minimum width is reached.

If you configure a text object using this option's features, make sure that you make the text object long enough to accommodate the anticipated length of the value.

General

If the number of digits exceeds the GSM_EXPONENT_PRECISION global parameter, then the number is displayed in scientific notation. If GSM_EXPONENT_PRECISION is not defined, the default number of digits is 6. If the number is larger than the precision of the format, it will be rounded in the display. For example, with the default precision:

1234567 displays as 1.23457e+6

7654321 displays as 7.65432e+6

Custom

Text objects in CimView have a Custom Display Format that can be used (along with C style 'printf()' specifiers) to change the behavior of the display.

This can be useful in modifying the format instead of the actual data to display it in a common format.

Example: Displaying a % sign preceding the actual value or converting the value such that it displays in a hexadecimal representation at runtime can be useful.

Format Specifiers List

Following is a simplified list of what format specifiers can be used.

Item Type Format
%d Signed decimal integer
%u Unsigned decimal integer
%f Decimal floating point number
%o Octal representation
%x Unsigned hexadecimal integer Lower Case
%X Unsigned hexadecimal integer Upper Case
%e Scientific notation (mantissa/exponent) Lower case
%E Scientific notation (mantissa/exponent) Upper case
%c Character Displays the equivalent ASCII character
%% Displays a % sign in the field Usually used as a suffix (for example, 25%)

Typically the format specifiers are used in the following notation:

%[flags][width][.precision]specifier

Custom Display Format Procedure

Do the following to use a Custom display format.

  1. Add a new text object to a CimEdit Screen.
  2. Right-click the text object
  3. Select ??Properties on the Popup menu. A Properties - Object dialog box opens.
  4. Select Text.
  5. Change the Display Value>Expression to be the name of the point that contains the value to display.
  6. Select Custom on the Display Format dropdown menu.

Result:??This now allows for the user to enter information in the Format Spec field.

Custom Format Examples

Following are examples for the Custom Format Specifier field and their displayed values:

Item Value
Point Value 123.45
Format Spec %d
Displayed 123
Point Value 50
Format Spec %05d
Displayed 00050
Point Value 123.45
Format Spec %3.1f Note 3 represents the width 1 represents the precision (number of digits after the decimal place)
Displayed 123.4
Point Value 50
Format Spec %o
Displayed 62
Point Value 123
Format Spec %x
Displayed 7b
Point Value 123
Format Spec %X
Displayed 7B
Point Value 123
Format Spec %#x Note: ??# means precede the display with 0x
Displayed ??0x7B
Point Value 123
Format Spec %e
Displayed 1.230000e+002
Point Value 123
Format Spec %E
Displayed 1.230000E+002
Point Value 38
Format Spec %c
Displayed &
Point Value 50
Format Spec %%%d
Displayed 50%

Integer

  1. Enter, in the Width field, the number of characters needed to display the results of the expression evaluation.
  2. Select the Zero filled check box to toggle the leading display of zeroes.
  3. Select the Digit Grouping check box to add the thousands separator to the result of the expression evaluation.
    Note: The Zero filled check box is disabled when you select the Digit Grouping check box.

Real

  1. Enter, in the Precision field, the number of places to the right of the decimal place that you want displayed.
  2. Enter, in the Width field, the number of characters needed to display the result of the expression evaluation.
  3. Select the Zero filled check box to display leading zeroes.
  4. Select the Scientific check box to use scientific notation for the value display.
  5. Select the Digit Grouping check box to add the thousands separator to the result of the expression evaluation.
    Note: The Zero filled and Scientific check boxes are disabled when you select the Digit Grouping check box.

Text

Enter, in the Max width field, the maximum number of characters needed to display the text string.

Time (Absolute, Seconds)

Interprets the expression as a UNIX absolute time. That is, the value represents the number of seconds since 00:00 GMT on January 1, 1970

Select the Time format you want to display.

Options are as follows.

  • h:mm:tt
  • HH:mm
  • HH:mm:ss
  • M/d/yy
  • MM/dd/yy
  • MM/dd/yyyy HH:mm:ss
  • YYYY:MM:DD:HH:MM:SS
  • yyyy:MM:dd:hh:mm:ss

You can choose to display time, date, or both.

If you choose the YYYY:MM:DD:HH:MM:SS format, you can only display values after 1995:01:01:00:00:00 (January 1, 1995 at 00:00 AM). Values before that date are displayed as ----:--:--:--:--:--.

Time (Absolute, ??Sub Seconds)

Interprets the expression as a UNIX absolute time. That is, the value represents the number of seconds since 00:00 GMT on January 1, 1970

Select the Time format you want to display.

Options are as follows.

  • h:mm:tt
  • HH:mm
  • HH:mm:ss
  • M/d/yy
  • MM/dd/yy
  • MM/dd/yyyy HH:mm:ss
  • MM-dd-yyyy HH:mm:ss:TTT
  • MM-dd-yyyy HH:mm:ss:TTTTTT
  • YYYY:MM:DD:HH:MM:SS
  • yyyy:MM:dd:hh:mm:ss
Note: TTT= milliseconds; TTTTTT=microseconds

Time (Relative, Seconds)

Interprets the expression value as an elapsed time value in seconds.

Select the Time format you want to display. You can choose to display time, date, or both.

Options are as follows.

  • DD:HH:MM:SS
  • HH.tenths
  • HH:MM:SS
  • MM.tenths
  • MM:SS

Example

An expression has the value 2 000 000 000.

An HH:MM:SS format displays the entire string value as: 555555:33:20.

Where

555555 = ??The entire HH value.

33 = MM

20 = SS

(555555*60 + 33)*60+20 = 2 000 000 000 seconds

Time (Relative, Sub Seconds)

Interprets the expression value as an elapsed time value in subseconds (e.g. milliseconds or microseconds)

Select the Time format you want to display. You can choose to display time, date, or both.

Options are as follows

  • DD:HH:MM:SS
  • DD:HH:MM:SS:TTT
  • DD:HH:MM:SS:TTTTTT
  • HH.tenths
  • HH:MM:SS
  • MM.tenths
  • MM:SS
Note: TTT= milliseconds; TTTTTT=microseconds
  • If you use a point with Custom conversion, the EU value of the point is a real (floating point) number and is best displayed with the General or Real format. These formats round floating-point numbers, while the Integer format truncates them.
  • For any of the Time display formats, if you wish to display text along with the expression, enclose each character of the text with single quotation marks. For example, to display the text as TTT ms, enter the text as TTT 'm''s'.