Skip to main content

Visualization Element: Table

Symbol:

_visu_img_table.png

Category: Common Controls

The element displays data that can be represented as an array in a table. Therefore, the data type of the visualizing variable can be 1) a one-dimensional array, 2) a maximum two-dimensional array, 3) an array of an array, 4) an array of structures, or 5) an array of a function block.

Element properties

Are all element properties available?

All properties are available only after you select the Advanced option or the All categories filter in Properties.

Element name

Example: Data set component 1

Tip

Assign individual names for elements so that they are found faster in the element list.

Type of element

Table

Data array

Array whose data is visualized as a table

Variable (ARRAY) whose data type determines the number of columns and rows in the table

. Array types
  • One-dimensional array: The table has one column.

  • Two-dimensional array: The second dimension determines the number of columns.

  • Array of an array: The number of array elements of the back array determines the number of columns.

  • Array of a structure: The number of structure members determines the number of columns.

  • Array of a function block: The number of local variables determines the number of columns.

Example: PLC_PRG.aiTable

Declaration: aiTable : ARRAY[0..3, 0..4] OF INT := [4(1, 2, 3, 4, 5)];

Tip

If the declaration of the array changes, then the table can be refreshed by placing the cursor in the data array value field and pressing the Enter key.

Maximum array index

Top index limit for the displayed table. Limits the number of displayed rows. The index begins at ArrayStart.

  • Variable (integer data type)

    Example: PLC_PRG.iUpperIndexBoundToDisplay

  • Integer literal

    Example: 4 is displayed as 5 in the row of the table.

Tip

The number of entries in the table can be set dynamically using the Maximum array index property. This may be necessary if the number of entries is only determined at runtime.

The index starts at ArrayStart and goes up to Maximum array index.

Columns

The Table element displays the values of a variable in a tabular view. The array elements of structure members are shown in a column or in a row. Two-dimensional arrays or arrays of a structure are shown in multiple columns. The visualized variable is defined in the Data array property. When a variable is assigned there, you can specify the display of the table columns where the array elements are shown. An individual configuration is possible for each column that is assigned to an index n.

Table 11. Columns: Column [<n>] Element Property

Column header

By default, the name of the array or structure is applied as the heading with the index or structure member for the column. If an array of a function block has been selected for Data array, then the name of the array is applied to the column header with the local variables of the function block that belong to the column.

The column label can be changed here by specifying a new title.

Width

Column width (in pixels)

Image column

standard icon: Images can be displayed in the column. Images are used from the global image pool or custom image pools. The image IDs are shown in the cells of the table as they are defined in the image pool.

Image configuration

Fill mode

  • Fill cell:

    The image resizes to the dimensions of the cell without fixing the height/width ratio.

  • Centered:

    The image is centered in the cell and retains its proportions (height/width ratio).

Transparency

standard icon: The color which is specified in Transparent color is displayed as transparent.

Transparent color

This color is displayed as transparent.

Requirement: The Transparency property is activated.

Text alignment of header

. Alignment of the column header:
  • Left

  • Centered

  • Right

Use template

_cds_icon_option_deactivated.png: The array data is displayed in the table.

_cds_icon_option_activated.png: The table cells get additional properties (configurable per column), namely all those which have a rectangle. This gives a table cell the same range of functions as a rectangle. The additional properties are displayed under the Template property.

Use case: In order to process user input (for example, clicking in a cell), this cell must have an input configuration. This is possible when the Use template option is activated. The Input configuration property is then available and a follow-up action can be configured for a mouse event.

Example: When a user clicks on the cell configured in this way in the running visualization, the Boolean variable assigned to the cell is toggled.

Text alignment of the headline from the template

_cds_icon_option_activated.png: The column label is created with the text properties from the template.

Template

When the Use template property is activated, this property is visible and all properties of a rectangle are available below it.

Tip

These properties and their configurable options are described in the help for the Rectangle, Rounded Rectangle, Ellipse element.



Show row header

standard icon: The row header is visible.

Example: For an array, the index of the array element is displayed in the header.

Show column header

standard icon: The column label is visible.

Row height

Height of the rows (in pixels)

Row header width

Width of the row label

Scroll bar size

Size of the scroll bar (in pixels)

Position

The position defines the location and size of the element in the visualization window. This is based on the Cartesian coordinate system. The origin is located in the upper left corner of the window. The positive horizontal X-axis runs to the right. The positive vertical Y-axis runs downwards.

X

The X-coordinate (in pixels) of the upper left corner of the element

Example: 10

Y

The Y-coordinate (in pixels) of the upper left corner of the element

Example: 10

Width

Specified in pixels

Example: 150

Height

Specified in pixels

Example: 30

Tip

You can also change the values by dragging the box _visu_icon_position_element.png symbols to other positions in the editor.

Text properties

The properties get fixed values for the text properties and act on the texts configured in Texts → Text or Texts → Tooltip.

Horizontal alignment

Horizontal alignment of the text within the element

Vertical alignment

Vertical alignment of the text within the element

Text format

. Definition for displaying texts that are too long
  • Default: The text which is too long is truncated.

  • Line break: The text is split into lines.

  • Ellipsis: The visible text ends with "..." indicating that it is not complete.

Font

Example: Default

_cds_icon_three_dots.png: The Font dialog opens.

_cds_icon_arrow_down.png: List box with style fonts

Font color

Example: Black

_cds_icon_three_dots.png: The Color dialog opens.

_cds_icon_arrow_down.png: List box with style colors

Transparency

Integer (value range from 0 to 255)

The transparent value determines the transparency of the respective color.

255: The color is opaque.

0: The color is completely transparent.

Note

If the color is a style color and already has a transparency value, then this property is write-protected.

Dynamic texts

Dynamic texts are variably indexed texts of a text list. At runtime, the text is displayed that is currently indexed in the variable.

Text List

. Name of the text list
  • As a variable (STRING)

  • As fixed string literal with single straight quotation marks

    Example: 'Errorlist'

_cds_icon_arrow_down.png: List box with the dialogs available in the text lists

Note: If a text list from the project is transferred to a visualization in a library, then a dot has to be prepended to the name of the text list.

Text index

. Text list ID which refers to the desired output text
  • As fixed string with the ID in single straight quotation marks

    Example: '1'

  • As a variable (STRING) for dynamically controlling the text output

    Example: strTextID

    Sample assignment: PLC_PRG.strTextID := '1';

Tooltip index

. Text list ID which refers to the desired output text
  • As fixed string with the ID in single straight quotation marks

    Example: '2'

  • As a variable (STRING) for dynamically controlling the text output

    Example: strToolTipID

    Sample assignment: PLC_PRG.strToolTipID := '2';

Font variables

The variables allow for dynamic control of the text display.

Font name

Variable (STRING) for the font of the text

Example: PLC_PRG.stFontVar := 'Arial';

The selection of fonts corresponds to the default Font dialog.

Size

Variable (integer data type) for the font size (in pixels)

Example: PLC_PRG.iFontHeight := 16;

The selection of font sizes corresponds to the default Font dialog.

Flags

Variable (DWORD) for the flags for displaying fonts

. Flags:
  • 1: Italics

  • 2: Bold

  • 4: Underline

  • 8: Strikethrough

Note

You can combine the font displays by adding the coding of the flags. For example, a bold and underlined text: PLC_PRG.dwFontType := 6;

Font

Variable (DWORD) for a character set number

The selection of character set numbers corresponds to the Script setting of the standard Font dialog.

Color

Variable (DWORD) for the color of the text

Example: PLC_PRG.dwColorFont:= 16#FF000000;

Flags for text alignment

Variable (integer data type) for coding the text alignment

Example: PLC_PRG.dwTextAlignment.

. Coding:
  • 0: Top left

  • 1: Horizontal center

  • 2: Right

  • 4: Vertical center

  • 8: Bottom

Note

You can combine the text alignments by adding the coding of the flags. For example, a vertical and horizontal centered text: PLC_PRG.dwFontType := 5;

Tip

Fixed values for displaying texts are set in Text properties.

State variables

The variables control the element behavior dynamically.

Invisible

Variable (BOOL) for toggling the visibility of the element

TRUE: The element is not visible at runtime.

Example: bIsVisible with VAR bIsVisible : BOOL := FALSE; END_VAR

Deactivate inputs

Variable (BOOL) for toggling the operability of the element

TRUE: User inputs do not have any effect in runtime more. The element is shown as deactivated.

Tip

The Invisible property is supported by the "Client Animation" functionality.

Selection

Selection color

Fill color of the selected row

Selection font color

Font color of the selected row

Frame selection type

. Selection when clicking the table row.
  • No selection: No selection

  • Cell selection: The clicked cell only.

  • Row selection: Row of the clicked cell.

  • Column selection: Column of the clicked cell.

  • Row and column selection: Row and column of the clicked cell.

Frame around selected cells

standard icon: A frame is drawn around the selected cells.

Variable for selected column

Variable (INT) for the array index of the column of the selected cell

If the data array points to a structure, then the structure members are indexed, starting at 0.

Warning

This index represents the correct position in the array only if no columns have been removed from the table in the display.

Variable for selected row

Variable (INT) for the array index of the row of the selected cell

Variable for valid column selection

Variable (BOOL)

TRUE: The Variable for selected column variable contains a valid value.

Variable for valid row selection

Variable (BOOL).

TRUE: The Variable for selected row variable contains a valid value.

Center

The properties contain fixed values for the coordinates of the point of rotation. The rotation point is displayed in the editor as the _visu_icon_center_point.png symbol and is used as the center for rotation and scaling.

Tip

You can also change the values by dragging the _visu_icon_center_point.png symbol to another position in the editor.

X

X-coordinate of the point of rotation

Y

Y-coordinate of the point of rotation

Absolute movement

The properties can be assigned to IEC variables for controlling the position of the element dynamically. The reference point is the upper left corner of the element. At runtime, the entire element is moved.

Movement

X

  • Variable (numeric data type) for the X-position (in pixels)

    Example: PLC_PRG.iPos_X

Increasing this value at runtime moves the element to the right.

Y

Increasing this value at runtime moves the element downwards.

Rotation

Variable (numeric data type) for the angle of rotation (in degrees)

Example: PLC_PRG.iAngle1

The midpoint of the element rotates at the Center point. This rotation point is shown as the _visu_icon_center_point.png symbol.

At runtime, the alignment of the element remains the same with respect to the coordinate system of the visualization. Increasing the value rotates the element to the right.

_visu_img_prp_rotation.png

Interior rotation

Variable (numeric data type) for the angle of rotation (in degrees)

Example: PLC_PRG.iAngle2

At runtime, the element rotates about the point of rotation specified in Center according to the value of the variable. In addition, the alignment of the element rotates according to the coordinate system of the visualization. Increasing the value in the code rotates clockwise.

The rotation point is shown as the _visu_icon_center_point.png symbol.

Note

If a static angle of rotation is specified in the Position → Angle property, then the static angle of rotation is added to the variable angle of rotation (offset) when the visualization is executed.

_visu_img_prp_inner_rotation.png

Tip

You can combine the variables to a Unit conversion.

Tip

The X, Y, Rotation, and Interior rotation properties are supported by the "Client Animation" functionality.

Animation

Tip

These properties are available only when you have selected the Support client animations and overlay of native elements option in the Visualization Manager.

Animation duration

Variable for the duration (in milliseconds) in which the element runs an animation

  • Variable (integer value)

    Example: Menu.tContent with VAR tContent : INT := 500; END_VAR

  • Integer literal

    Example: 500

. Animatable properties
  • Absolute movement, Movement, X, Y

  • Absolute movement, Rotation

  • Absolute movement, Interior rotation

  • Absolute movement, Exterior rotation

The animated movement is executed when at least one value of an animatable property has changed. The movement then executed is not jerky, but is smooth within the specified animation duration. The visualization element travels to the specified position while rotating dynamically. The transitions are smooth.

Move to foreground

Variable (BOOL) for setting the element in the foreground

TRUE: At runtime, the visualization element is displayed in the foreground.

FALSE: At runtime, the visualization element is displayed in the layer where it was inserted in the visualization editor.

Example: bIsInForeground with VAR bIsInForeground : BOOL := FALSE; END_VAR

Access Rights

Note

Available only when a user management is set up for visualization.

Access Rights button

Opens the Access Rights dialog. There you can edit the access privileges for the element.

. Status messages:
  • Not set. Full rights.: Access rights for all user groups : operable

  • Rights are set: Limited rights: Access is restricted for at least one group.