You can assign the same address to more than one variable. However, this is not recommended
as it reduces readability and makes the program more difficult to debug. If you do this, set an ini-
tial value for only one of the variables. If you set a different initial value for each individual vari-
able, the initial value is not stable.
You cannot use an AT specification for an EtherCAT slave. Always specify the device variables
for EtherCAT slaves.
Use the Retain attribute to specify whether a variable should retain its value in the following cases.
• When power is turned ON after power interruption
• When the operating mode is changed
• When a major fault level Controller error occurs
If the Retain attribute is not set, the value of the variable is reset to its initial value in the above situa-
tions.
You can specify the Retain attribute when you need to retain the data that is stored in a variable (such
as the manufacturing quantities) even after the power to the Controller is turned OFF.
For a variable with an AT specification, the setting of the Retain attribute must agree with address in the
memory area where the address is assigned.
(Retained areas: Holding, DM, and EM Areas
Non-retained areas: CIO and Work Areas)
Conditions Required to Enable the Retain Attribute
The CPU Unit must contain a Battery.
Using Initial Values for Retain Variables
When you download the user program, select the Clear the present values of variables with Retain
attribute Check Box.
Operation with and without the Retain Attribute
The following table shows when variable values are retained or not.
Retain
Case
Values of variables
Retain attribute speci-
fied
Retain attribute not
specified
When power is turned ON after power interruption Retained. Not retained.
When the operating mode is changed
When a major fault level Controller error occurs
When you download the
user program
When the Clear the pres-
ent values of variables
with Retain attribute
Check Box is selected.
When the check box is
not selected.
Not retained.