Name a Variable
- In the Name column of the table, select the cell 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.
- have the same name as a standard or C function or function block.
- See the List of C Functions webpage.
- A variable must not have the same name as a program or a user-defined function block.
- The name of a variable must begin by a letter or an underscore (_), followed by letters, digits, or underscore marks.
- Two consecutive underscores in a variable name is not allowed.
- Naming is case-insensitive.
- Two names with different cases are considered as the same.
Name Physical I/Os
Each I/O channel has a predefined symbol that reflects its physical location.
- This symbol begins with:
- %I for an input.
- %Q for an output.
- The symbol is followed by a letter identifying the physical size of the data.
- See Variables for more information.
Change the Name of an I/O Variable
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.
- 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 shown in the Name column of the grid.