Configure Table
As soon as a table is inserted for the purpose of visualization of an array, the dialog Configure Table will be openend. Besides the categories 'Tooltip' and 'Security' which are also available for other visualization elements, the following categories will be available for configuring display and contents of the table:
Category Table:
Dialog for the configuration of a Table, Category Table
Do the following table settings:
Data array: Insert the name of an array which should be visualized in the table. It is recommended to use the input assistant (<F2>) resp. the Intellisense function.
Column header, Line header: Activate these options if you want to get displayed the titles in the table. The line title reflects the array index (first column of the table), the column title can be defined in category 'Columns'.
Category Columns:
Dialog for the configuration of a Table, Category Columns
Here you define the table elements. In the left window you get al list of all elements, which are handled in the array per index. In case of an array of a structure these would be the structure components.
Using the arrow button > you can transfer a selected component from the left window to the right window where you define the set of elements to be displayed in the table. Pressing button >> all elements will be transferred at a single blow. In the same manner you can remove elements from an already defined set (<, <<). In order to modify the default settings concerning the display of the table column for one of the elements, perform a double-click on the desired entry in the right part of the window, or press button '...' to open the dialog 'Configure columns':
Dialog for Configuring a Table, Category Columns, Column Properties
Editing the column header and the column width:
Initially the edit field Column header will contain an automatically created title (e.g. "PLC_PRG.arr1[INDEX].iNo" in case of an array of structure. for the column representing the structure component "iNo"). which you can change Further on the Column width (number of characters) can be set.
Editing configuration parameters for all elements of a column:
By default the table fields are displayed as simple rectangles and the entries are not editable. If you however activate the option Use template, a pre-defined set of parameters can be used, e.g. for the line width, the text input possibilities etc. To edit these parameters the common configuration dialogs as know for rectangles, bitmaps, buttons etc. are available, which you can access by a mouse-click on the button Edit template.
In order to define online actions for all entries of a column, i.e. for all array-elements of one array dimension, use the placeholder [INDEX] when entering the array name in the configuration dialogs (e.g. PLC_PRG.arr1[INDEX] like used in the default column header).
Example:
You want to visualize an array "arr1 [0..2] of BOOL" (table with 1 column) and you want, that in online mode by a mouse-click on a table cell the cell gets red-colored and the corresponding array element will be toggled and vice versa.
To reach this activate 'Use template' in the configuration dialog for the column and define the template as follows: Category 'Input', Action 'Toggle variable': "PLC_PRG.arr1[INDEX]. Category 'Colors': Alarm color red.
Category 'Variables', Action 'Change color': "PLC_PRG.arr1[INDEX].
Category Rows:
Row height: Insert the desired height in number of pixels
Dialog for configuring a Table, Category Rows
Category Selection:
Dialog for configuring a Table, Category Selection
Here you can set the following parameters concerning the selection behaviour within the table:
Selection color: Press this button to get the standard color dialog for choosing a color for selected cells.
Selection type: Define which part of the table will be selected when you perform a mouse-click on one of the table fields in online mode:
Select single cells: Only the cell will be selected.
Select only rows: The whole line will be selected.
Select only columns: The whole column will be selected.
Select rows and columns: The whole column and line will be selected.
Frame around selected cells: A selected cell gets surrounded by a frame.
Variable for selection X, Variable for selection Y: Here you each can enter a project variable, which will indicate the X- resp. Y-Index of the selected table cell.
Example:
Create a table element visualizing the array of a structure:
Define the following structure
TYPE strucTab :
STRUCT
iNo: INT;
bDigi : BOOL;
sText:STRING;
byDummy: BYTE;
END_STRUCT
END_TYPE
In PLC_PRG define the following array:
arr1:ARRAY [1..5] OF strucTab;
and the following variables:
selX:INT;
selY:INT;
Create a visualization object and insert a table element. Configure like follows:
Cat. table: data array: PLC_PRG.arr1
Cat. Columns: (Close the dialog which will open with YES) – Transfer the components iNo, bDigi, sText to the right window - In the right window perform a double-click on the first entry (PLC_PRG.arr1[INDEX].iNo) and in the dialog which will open, replace the default title by "Number". Confirm with OK and also define new column titles for the other two entries (e.g. "Value" and "Text"). – In category 'Spec.Table' enter at 'Variable Selection X': "PLC_PRG.selX" and at Variable Selection "Y: PLC_PRG.selY". Activate option 'Frame around selected cells'. Press button 'Selection color' and choose color 'yellow'. Close the configuration dialog with OK. The table element now should be displayed as shown in the following:
At the left border the numbers of the array index, at the top the titles of the selected structure components. You can modify the column widths by placing the cursor on the separator between two columns and moving the mouse as soon as the cursor appears as a horizontal double-arrow. .
In online mode the current values of the array elements will be displayed in the table cells. As soon as you select a table cell by a mouse-click, it will get yellow-colored and surrounded by a frame.
Example:
Meter
Dialog for the configuration of a Meter element
This dialog will open automatically as soon as you insert a Meter into a visualization object. A Preview is part of the dialog, immediately showing how the element will look as a result of the currently set parameters:
Arrowtype: Define the type of the arrow which will point at the current value on the Meter. Possible types: Normal arrow, thin arrow, Wide arrow, Thin needle.
Arrow start, Arrow end: Here you define the start and the end positions of the scale on a virtual circular arc in ° Degrees (angle). (Example: a Start angle of 180° and an End angle of 0° will define a upturned semicircle).
Arrow color: This button opens the standard dialog for choosing a color. Define the color of the pointer.
Variable/Scale: This button opens the dialog Configure scale and variable:
Dialog for Configuring the Scale and Variable for a Meter element
Scale start, Scale end: lowest and highest value on the scale, e.g. "-4" and "4".
Main scale: Define which intervals on the scale should be marked "with all", that means which should get a scale pitch and a label. If you insert e.g. "2", each second integer value will be indicated.
Sub scale: In addition to the main scale (Label + long pitch lines) here you can define a sub-scale which will be displayed as short pitch lines without any labels.
Unit: Define here the scale unit, e.g. "cm" or "sec". The unit is indicated by a label at the origin of the pointer.
Scale format (C-Syntax): According to the C-syntax you can define the display format of the scale labels; see the description concerning Category 'Text'.. Example: If you insert "%1.1f" the scale values will be indicated by a floating-point number with one decimal place before and one after the comma (e.g. "12.0")
Variable: Here you can define a variable which is assigned to the pointer position. (e.g. "PLC_PRG.posvar")
Font selection: This button will open the standard dialog for defining the font used in the Meter element.
Color areas: This button opens the dialog Configure color areas: Here you can define a separate color for each partition of the scale.
Dialog for the configuration of color areas for a Meter
Begin of area, End of area: Insert here the start and end values of the scale partition which should get the color defined in the following:
Color selection: This button opens the standard dialog for choosing a color. Confirm your selection with OK, which will close the dialog, and press button Add, whereupon the color and the assigned partition of the scale will be added to the window 'Active areas'. In order to remove an already defined area, select the entry and press Delete.
If the option Durable color areas is activated, the defined color ranges will be displayed permanently, otherwise in online mode just that partition of the scale will be colored which contains the current value of the respective value.
Label: Depending on which of the options is activated (inside or outside), the scale labels are placed at the inside or the outside of the circular arc of the scale.
Additional settings:
Frame inside, Frame outside: If one or both options is/are activated, an inner or outer frame will be added to the scale arc.
Additional arrow: In addition to the main pointer a little arrow will indicate the current value directly on the scale.
Bar Display
Dialog for the configuration of a Bar Display element
This dialog will be opened as soon as you insert a Meter element into a visualization object. A Preview is part of the dialog, immediately showing how the element will look as a result of the currently set parameters:
Diagram type: Choose one of the options: 'Scale beside bar', 'Scale inside bar' und 'Bar inside scale'.
Orientation: Define one of the options: Horizontal or Vertical bar.
Running direction: Choose whether the bar should be elongated corresponding to a growing value of the assigned variable in Left – Right or in Right – Left direction.
Bar color: This button opens the standard dialog for choosing a color. Define a color for the bar in normal state (no alarm). If option 'Use color areas' (see below) is activated, no entries are possible.
Alarm color: This button opens the dialog Configure alarm, where you define at which value the bar will be displayed in alarm color and which is the alarm color: Insert the desired limit value in the edit field and activate one of the Conditions greater than or lower than, to define whether values higher or lower than the limit value should set off an alarm. Press button Alarm color to open the standard color dialog for choosing an alarm color. Close both dialogs with OK to confirm the settings and to return to the main dialog for configuring the bar display. If the option 'Use color ranges' (see below) is activated, no entries are possible.
Variable/Scale: This button opens the dialog Configure scale and variable, which corresponds to that used for the Meter element.
Element frame: If this option is activated a frame will enclose the bar display.
Bar background: If this option is activated, the whole display range will be indicated by a black bar in the background of the current values' bar, otherwise only the current values' bar will be displayed.
Use color areas: If this option is activated, any settings defined in the dialogs for 'Bar color' and 'Alarm color' (see above) will not be valid. In this case the color area definitions will be used, which have been made in the dialog 'Configure color areas'. This dialog can be opened by pressing button 'Color areas' (see below)
Color areas: This button opens the dialog Configure color areas where you can define a separate color for each partition of the scale. These definitions will only be valid if the option 'Use color areas' (see above) is activated. Use the dialog as described for the Meter element.
Histogram
A histogram element can be used to visualize an array. The values of the array elements will be represented by bars or lines side by side, indicating the current values of the element by their height.
Dialog for the configuration of a Histogram
The configuration dialog will be opened as soon as you insert a histogram element into a visualization object. A Preview is part of the dialog, immediately showing how the element will look as a result of the currently set parameters:
Presentation: Activate one of the options Barchart or Lines.
Show horizontal lines: If this option is activated, horizontal lines spanning the diagram will additionally display the scale gradation.
Alarm color: This button opens the dialog Configure alarm, where you define at which value the bar will be displayed in alarm color and which is the alarm color: Insert the desired threshold value in the edit field and activate one of the Conditions greater than or less than, to define whether values higher or lower than the limit value should set off an alarm. Press button Alarm color to open the standard color dialog for choosing an alarm color. Close both dialogs with OK to confirm the settings and to return to the main dialog for configuring the histogram.
Variable/Scale: This button opens the dialog Configure scale and variable, which can be filled like described for the Meter element.
Color areas: This button opens the dialog Configure color areas: Here you can define a separate color for each partition of the scale. See the description of the Meter where the same dialog is available.
Bar color: This button opens the standard dialog for choosing a color. Define a color for the bar in normal state (no alarm).
Barcount: Insert the desired number of bars (e.g. corresponding to the number of elements of the array).
Barwidth: Define the width of the bars in percent by the total width available for one bar.
Example:
See in the following picture an example of the online display (bars resp. lines) of a histogram which represents an array arr1 [0..4] of INT. The number of bars appropriately was set to "5", the scale start to "–4", the scale end to "24", the main gradation was set to "2", the sub-gradation to "1" and the scale range 0 – 8 has got assigned another color (dark grey) than the rest of the scale range. Furtheron the bars should be displayed alarm-colored (blue) as soon as the value of the corresponding array element exceeds "8". You see the array elements arr1[2] and arr1[3] currently beeing in alarm state: