Name a Variable

Use this procedure to change the name of the variable:

  1. In the Name column of the table, select the cell to edit.
  2. Press ENTER (or press the first character of the new name).
  3. Enter the name in the small box.
  4. 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.

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.