Formatted display of a value in a text field

The animation function "formatted display of values in a text field" in the ScriptWizard enables setting the content in a text field and defining the appearance and unit of a graphical object.

Figure: Overview -Formatted display of a value in a text field

Structure

The following paragraphs list all fields and options of the animation function "formatted display of a value in a text field" and explain how to use them.

Text field

The text field list contains all available text fields. Select a text field and the value / texts are written into this text field.

Value to display

The value is the text which is shown in the text field. You can either enter a new text or select an already defined variable which contains the text for the text field. The defined variables of dpConnects are displayed with their description and the variable name (in brackets) in the dropdown menu. For stating static values the option "..." can be used inside the dropdown menu.

To apply the text of a data point to a text field, the value must be saved inside a variable and the variable must be used as text for the text field.

Format choice

The following three options are available to be selected as the format of a text field:

  • No format specified => No specified format is used.

  • Format from data point => The text matches the format of the selected data point (e.g. a float value: 0.00000).

  • Format specified => Allows using a format string of its own. Please refer to Format.

Format

The option allows setting a user-defined format. Click on the push button "select format" to define a format of the text. In the format selection dialog you can define how many digits are shown in front of and behind the decimal point. Besides you can also define whether to display the sign or not.

Figure: Format selection

Unit choice

The following three options are available in the unit choice text field:

No unit specified => There is no specified unit.

Unit specified => A suitable specified unit can be defined. Please refer to Unit.

Unit from data point => The unit from a data point is accepted and used in this text field.

Unit

Enable to select a user-defined unit. You can either enter the unit manually, or select an option in the existing SI unit list.

Figure: Select a unit

Sample

If you move the mouse cursor to this area, the currently selected animation will be simulated.

Help

For more information about the function "formatted display of a value in a text field" please refer to the WinCC OA 3.11 online help by clicking on the push button "Help".

Apply

Click on the push button "Apply", the entered values are accepted they apply to the current function.

Cancel

Click on the push button "Cancel" and the entered values are rejected. A new animation function can be then selected.

Figure: A new function to display a formatted value in a text field added successfully