Variables tab
Figure 3-5: Dictionary Toolbox
The list of variables is split into two parts:
- All the Variables at the top
- All the Structures at the bottom
-
-
For more information about the procedure to create an instance of a structure, see "Call Functions or Function Blocks"
-
-
To show all the variables of all programs, select 'PLC "Programmable Logic Controller" A Programmable Logic Controller, PLC, or Programmable Controller is a digital computer used for automation of industrial processes, such as control of machinery on factory assembly lines. Used to synchronize the flow of inputs from (physical) sensors and events with the flow of outputs to actuators and events' in the project tree.
Right-click in the Dictionary window to open the menu as follows:
Figure 3-6: Dictionary Contextual Menu
This menu allows you to perform the following actions:
Command | Description |
---|---|
Undo | Undo the last action performed on the Dictionary |
Redo | Redo the last undone action |
Add Variable |
Add a new variable in the selected level (Global, Retain, program). This automatically creates a new variable called NewVar with type BOOL For a Function or UDFB "User Defined Function Block"
UDFB can be used as a sub-function block in another program of the application. It is described using FBD, LD, ST or IL language. Input / output parameters of a UDFB (as well as private variables) are declared in the variable editor as local variables of the UDFB, you can specify input and output parameters |
Rename variables | This function can either replace a section of matching variables or append text to the variables' names. |
Edit variables as text | This function will open a text editing dialog, allowing you to edit the variables found in the group as text using IEC "International Electrotechnical Commission"
IEC is a not-for-profit, non-governmental international standards organization that prepares and publishes International Standards for all electrical, electronic and related technologies 61131-3 syntax. |
Copy variable value to init value | This function copies the current value of a retain variable to the variable's initial value. See Copy a Retained Variable Value to Init Value for more information. |
Browse variable | This function allows you to browse all instances of a variable. |
Add Structure | Used to have a new complex type. A structure named NewStructure is created and variables can be dragged into it |
Rename Structure | Rename the selected structure |
Copy | Copy a variable |
Paste | Paste the copied variable to the selected level |
Delete | Delete the selected variable. A deletion can also be performed by pressing the Delete key on the keyboard |
Find all | This function will find all instances of the specified variable and open the results in the Find and Replace tab. |
Open UDFB | Open the selected UDFB instance |
Map to Oscilloscope channel ... |
Plug the selected variable on a channel. This command opens a dialog used to configure the variable plug operation. This command is enabled when your application is connected and running, and if the type of variable is eligible for the softscope (i.e. BOOL, INT, SINT, DINT, LINT, UINT, USINT, UDINT, ULINT, BYTE, WORD, DWORD, LWORD, TIME and LREAL, as long as they are not in a UDFB instance |
Unmap all Oscilloscope Channels | Unplug all plugged probes from the softscope |
Variable I/O mapping | Connect a variable to an I/O. |
Print Dictionary ... | Print all the variables displayed in the Dictionary and sorted by programs. The columns display the Name, Type, Dimension, Initial Value, and Attributes |
The Track Selection filters the displayed items in the dictionary to show only items linked to the current PLC selected program:
- Unchecked: All your project variables will be displayed. This is the default setting.
- Selected: The variables in the Dictionary are filtered to display only those that are relevant to the PLC item currently selected in the project tree. Along with the Global, retains and variables related to the selected program or UDFB, structure definitions will be displayed. The dictionary content will change accordingly if another PLC program is selected in the project tree.
There are two available modes when editing a variable in the Dictionary:
- Cell: only the selected cell is active
- Row: all the row is active
Press Spacebar to toggle the selection mode from cell to row
- The columns in the Variables tab can be reordered, resized, and hidden by double clicking on the filter icon in top left corner of the table. This opens a dialog box which allows you to modify the table's appearance. These settings will persist until you change them. Please note that the Visible box for the Value field cannot be changed as the Value column is automatically shown in debug and online modes but hidden in edit mode.
- You can sort the list of variables in the table as follows:
(Press Spacebar to toggle to the relevant edition mode).
Mode | Description |
---|---|
One Parameter | Assuming you are in the cell edition mode, double-click on the parameter |
All the parameters are at the same time | Assuming you are in the row edition mode, double-click in any parameter to open the dialog box for variable configuration as shown below. Figure 3-7: Configure the Variable |
-
-
It is not possible to modify a variable when the KAS IDE "Integrated development environment" An integrated development environment is a type of computer software that assists computer programmers in developing software. IDEs normally consist of a source code editor, a compiler and/or interpreter, build-automation tools, and a debugger is connected to the controller.