Visualization Element ‘Text Editor’¶
Symbol:
Tag: Special controls
This element shows the contents of text files that are saved on the PLC. The files can be encoded in ASCII or Unicode formats.
A visualization user can also edit the text.
Element Properties
Element name | Example: GenElemInst_1 |
Type of element | textual editor |
Element property ‘Position’
The position defines the location and size of the element in the visualization window. These are based on the Cartesian coordinate system. The origin is located at the upper left corner of the window. The positive horizontal x-axis runs to the right. The positive vertical y-axis runs downwards.
X | X coordinate of the upper left corner of the element Specified in pixels. Example: |
Y | Y coordinate of the upper left corner of the element Specified in pixels. Example: |
Width | Specified in pixels. Example: |
Height | Specified in pixels. Example: |
Note
You can also change the values by dragging the box symbols ( ) to other positions in the editor.
See also
Element property ‘Font’
Name | Unproportional font for displaying the file contents in the visualization. Example: Courier New |
Size | Font size Example: |
Element property ‘Control variables’
Variable | Variable ( Example: |
Open | Variable ( Example:
|
Close | Variable ( Example:
|
Save | Variable ( Example:
|
New | Variable ( Example:
|
Variable | Variable ( Example: |
Find | Variable ( Example:
|
Find next | Variable ( Example:
|
Line | Variable (integer data type). Contains the line of the cursor. Example: |
Column | Variable (integer data type). Contains the column of the cursor. Example: |
Position | Output variable (integer data type). Returns the absolute cursor position in the text. Example: |
Set cursor | Variable ( Example:
Please note: This variable is used as the control variable for an input event triggered by a visualization user. |
Start position | Output variable (integer data type). Shows the absolute position for starting the text selection. Example: |
End position | Output variable (integer data type). Shows the absolute position for ending the text selection. Example: |
Start line number | Output variable (integer data type). Shows the line where the text selection begins. Example: |
Start column index | Output variable (integer data type). Shows the column where the text selection begins. Example: |
End line number | Output variable (integer data type). Shows the line where the text selection ends. Example: |
End column index | Output variable (integer data type). Shows the column where the text selection ends. Example: |
Line to select | Variable (integer data type). Contains the line number that is selected. Please note: The selection is controlled by the variables in the Trigger select property. |
Set select | Variable ( Example:
if the line is not in the current text segment of the text editor, then the text segment is moved to this line. Please note: This variable is used as the control variable for an input event triggered by a visualization user. The control variable is not reset automatically. You are responsible for this happening in the visualization. |
Variable for error code | Variable (integer data type). Contains the error code when an error occurs. Example: The error codes are declared in |
Variable for content changed | Variable ( Example:
|
Variable for access mode | Variable ( Example:
Please note: The variable overwrites the setting in the Editor mode property. |
Maximum line length | Maximum number of characters per line |
Editor mode |
|
Element property ‘New files’
Encoding | Character encoding of the new file:
|
New line character sequence | End of line character of the new file:
Please note: When a visualization user opens an existing file, the end-of-line character of the file is detected and used automatically. |