Variable parameters

The variable parameters displayed in the variable grid vary with:
Variable parameters
Parameter
Description
Name
The variable name
Variable naming conventions are as follows:
  • Starts with a letter or an underscore.
  • Cannot end with an underscore.
  • Cannot contain consecutive underscores.
  • Contains no more than 40 characters.
  • Can contain numbers, letters, or underscores.
The naming convention is based on the IEC-61131 rules for identifiers.
Alias
A short name used in graphical language editors. An alias name contains no more than 128 ASCII characters.
Data Type
The type of the variable
Supported types are:
For information about data types, see Data types overview.
Dimension
The size or the number of elements of an array
For example,
[1..3,1..10] represents a two-dimensional array containing a total of 30 elements.
The recommended maximum size limit for a multi-dimensional array is [1..400,1..40].
Value
When the controller is offline, it shows the last known value of the variable in memory.
When the controller is online, it shows the live value of the variable in memory.
Values are not available with
Micro810
controllers.
It uses the syntax corresponding to the
Data Type
.
Initial Value
The value of a variable when the controller starts execution for the first time. For example, after a program download.
If the value is not retained, the initial value is the value of a variable after a controller power cycle.
The initial value can be the default value or the value that is defined by the user when creating the variable.
It uses the syntax corresponding to the
Data Type
.
Comment
User-defined text
A comment contains no more than 250 ASCII characters.
String Size
The length of a string variable
It is available for the string data type. The value is from 1 through 252.
External Access
Determines whether to allow data exchange for the variable between the controller and
FactoryTalk Design Workbench
.
Options are:
  • No Access
  • Read/Write
  • Read
By default, most global variables can be accessed using symbolic addressing over a Common Industrial Protocol network, such as a human-machine interface using EtherNet/IP, unless access rights are defined in the variable grid.
Direction
The role of a variable as an input variable, an output variable, or an internal variable
Options are:
  • Var
  • VarInput
  • VarOutput
Attribute
The property of a variable that indicates its accessibility for reading and writing
Options are:
  • Read
  • Read/Write
  • Write
Retained
It is available for user-defined variables.
It determines the value to be restored to the variable after a power cycle.
  • Select
    Retained
    to retain the variable value after the controller is turned off, and then restore the retained variable value after the controller is turned on.
  • Clear
    Retained
    to set the variable value to its initial value after the controller is turned on or turned off.
The parameter is available for
Micro810
, L20E, and L70E controllers. The variable values for other
Micro800
controllers are retained after a power cycle.
By default, when creating a variable:
  • The variable is set as not retained for L20E controllers.
  • The variable is set as retained for L70E controllers. For L70E controllers with plug-in and expansion modules, the I/O variables are not retained.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal