Text Editor
The visualization element Text editor is used to display and edit the content of text files in ASCII or Unicode, which are located on the controller.
The Text editor element can only be used in combination with the PLC HMI and/or the PLC HMI Web. |
Properties editor
The properties of a visualization element - except alignment and order - can all be configured in the properties editor. By default, this editor opens next to the visualization editor, or it can be opened explicitly via the "Properties" command (which can be found in the View menu as standard).
A property can be modified by editing the field "Value". To this end, an input field, a selection list, a dialog or checkbox that can be activated is provided in this field, depending on the element type. The value field opens
- after a double-click,
- after a single click in a selected field,
- via the space bar, if the field was already selected.
If a variable is assigned,
- simply enter its name.
- Use the button to open the input assistant for selecting a variable. The Variables category lists all variables that have already been defined in the project.
Working in the list of properties can be made easier with the aid of default, sorting and filter functions.
Element properties
All element properties and their descriptions are listed below.
Element name | The element name can be changed. Standard name is "GenElemInst_x". "x" stands for a sequential number. |
Element type | The element type is entered here. For three element groups it is possible to switch between the corresponding elements by changing the element type: |
Position
Here you can define the position (X/Y coordinates) and size (width and height) of the element in pixels. The origin is in the top left corner of the window. The positive x-axis is on the right, the positive y-axis runs downwards. If the values edited, the displayed element is simultaneously modified in the visualization editor.
X | Horizontal position in pixels – X=0 is the left edge of the window. |
Y | Vertical position in pixels – Y=0 is the upper edge of the window. |
Width | Width of the element in pixels |
Height | Height of the element in pixels |
Font
Name |
Name of a font installed on the system. The text is output in the text editor with this font. A non-proportional font such as Courier New must be used. |
Size |
Font size Example: 12 |
Control variable
File
File name |
STRING variable containing the file name, and, if necessary, the path |
Open |
Boolean variable for controlling the opening of the file specified in "File name". If the variable is set to TRUE, the file opens. |
Close |
Boolean variable for controlling the closing of the file. The file closes if the variable is set to TRUE. |
Save |
Boolean variable for controlling the saving of the file. The file is saved if the variable is set to TRUE. |
New |
Boolean variable for controlling the generation of a new file. If the variable is set to TRUE, a new file is created with the name defined in "File name". |
Edit
Search for |
STRING variable containing the search term |
Find |
Boolean variable that controls the search for the search term. The search starts if the variable is set to TRUE. |
Find next occurrence |
Boolean variable for controlling the search for the next occurrence of the search term. If the variable is set to TRUE, the search starts at the current position. |
Caret position
Row |
Integer variable that contains the current row number, as long as "Trigger setting" is FALSE. |
Column |
Integer variable that contains the current column number, as long as "Trigger setting" is FALSE. |
Position |
Integer variable that contains the current caret position in consecutive numbering, as long as "Trigger setting" is FALSE. |
Trigger setting |
Boolean variable that controls the caret position. If the variable is FALSE, the variables in "Row", "Column" and "Position" contain the current position. If the variable is TRUE, the caret is set to the position specified in "Row" and ‘Column’. |
Selection
Start position |
Integer variable containing the start position of the text selection in consecutive numbering. |
End position |
Integer variable containing the end position of the text selection in consecutive numbering. |
Start line number |
Integer variable containing the line number at the start of the text selection. |
Start column index |
Integer variable containing the column index at the start of the text selection. |
End line number |
Integer variable containing the line number at the end of the text selection. |
End column index |
Integer variable containing the column index at the end of the text selection. |
Line to be selected |
Integer variable determining a line to be selected |
Trigger selection |
Boolean variable for controlling the text selection. If the variable is set to TRUE, the text selection is set as defined in "Row to be selected". |
Error handling
Variable for error number |
Integer variable that contains the error number in case of error. The numbers are declared in GVL_ErrorCodes, part of the library "VisuElemTextEditor". To obtain the error text associated with the error number, call the function VisuFctTextEditorGetErrorText(), which is contained in the library. |
Variable changed for content |
Boolean variable. The content of the text editor has changed if the variable value is TRUE. |
Variable for access mode |
Boolean variable. If the variable value is TRUE, the file has read access only. If the variable value is FALSE, the file has read and write access. |
Maximum line length |
Integer variable for specifying the maximum length of a line |
Edit mode |
Here can select the edit mode:
The file can only be read. In this mode the editor is shown with a light grey background, if the controller is running.
The file can be read and written. |
New files
Character encoding |
The character encoding when a new file is created can be specified here:
|
Line end character |
If a new file is created, the line end character must be defined here:
If an existing file is opened, the line end character of the file to be opened is identified and used automatically. |
Access rights
This setting relates to the access rights for the individual element. Click to open the Access rights dialog. The setting is only available if a user management was added to the PLC project. The following status messages are available:
Not set. All rights. | The default message is set, if the element is shown as available for all groups. |
Rights are issued: Limited rights. | The message is set, if the element is shown with limited behavior for at least one group. |