8. Text Value Animation

About this task

  • 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 Display format
C Translate result value
D Setpoint action
A Expression

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

B 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.

Up

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.

%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.

Procedure

  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.

Results

 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:

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%

Up

Integer

  1. Enter, in the Width field, the number of characters needed to display the results of the expression evaluation.
  2. Check Zero filled to toggle the leading display of zeros.

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 results of the expression evaluation.
  3. Check Zero filled to display leading zeros.
  4. Check Scientific to use scientific notation for the value display.

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

Note: 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.
C Translate result value

When Translate result value is checked:

  • 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 display in CimView when the assigned language is selected.

  • Setpoint action is disabled.
D Setpoint action

Setpoint action features are enabled if you enter a single point ID in the Expression field.

Tip: CimEdit also provides:
  • Setpoint actions.
  • Slider action check boxes on the Movement tab in the Properties dialog box.
A Setpoint

A CimView screen user who has the privilege can set the point expression value during runtime.

B Confirmed

When Confirmed is checked a confirmation message will display during runtime after the accompanying setpoint action is performed.

C Advanced

Opens the Execution Condition dialog box.