Name a variable
- In the Name column of the table, select the cell you want to edit
- Press ENTER (or press the first character of the new name)
- Enter the name in the small box
- Press ENTER to validate the name or ESCAPE to cancel the change
A variable must be identified by a unique name within its parent group. The variable name cannot be a reserved keyword of the programming languages and cannot have the same name as a standard or "C" function or function block. A variable must not have the same name as a program or a user-defined Function A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. Block.
The name of a variable must begin by a letter or an underscore ("_") mark, followed by letters, digits or underscore marks. It is not allowed to put two consecutive underscores within a variable name. Naming is case-insensitive. Two names with different cases are considered as the same.
Naming Physical I/Os
Each I/O channel has a predefined symbol that reflects its physical location. This symbol begins with "%I" for an input and "%Q" for an output, followed by a letter identifying the physical size of the data. Refer to the description of variables for more details.
You cannot change the "%..." name of an I/O variable. This name is directly allocated according to the I/O devices defined in the I/O device list. But you can give an alias (a readable name) to each I/O channel. In that case, either the "%" name or the alias can be used in programs. The alias must fit to the same rules as a variable name.
When an alias is defined for a variable, both "%..." name and alias are displayed in the "name" column of the grid.