Some Basic I/O Units have more than one access method for the same I/O port, such as bit
string data and BOOL data. If you use initial values for this type of I/O port, set the initial values
for one of the access types to None.
When Initial Values Are Set
The initial value is assigned to the variable at the following times.
• When power is turned ON
• When the operating mode changes from PROGRAM to RUN mode or from RUN to PROGRAM
mode
• When you select the Clear the present value of variables with Retain attribute Check Box, and
download the user program
• When a major fault level Controller error occurs
When the Initial Value Specification Is Left Blank
The following initial values are used for variables for which the initial value specification is left blank.
Initial Value of Array Variables
Initial Values for Derivative Data Types
You do not specify an initial value for the data type itself. You set an initial value for each individual
variable.
Variables That Do Not Apply Initial Values
For the following variables, initial values are not applied when the power is turned ON, and the val-
ues before the power interruption are retained.
• Variables with Retain attribute
Data type Default initial value
Boolean and bit strings
BOOL, BYTE, WORD, DWORD,
and LWORD
0
Integers
SINT, INT, DINT, LINT, USINT,
UINT, UDINT, and ULINT
0
Real numbers REAL and LREAL 0.0
Durations, dates, times of day,
and dates and times
TIME T#0S
DATE D#1970-01-01
TIME_OF_DAY TOD#00:00:00
DATE_AND_TIME DT#1970-01-01-00:00:00
Text strings STRING ‘ ‘(blank character)
Data type Initial value specifications
Array specifications
• You can specify an initial value for each element.
• To specify initial values, you must specify a value or leave the specification
blank for each element.
Data type Initial value specifications
Structures
• You can specify an initial value for each member.
• To specify initial values, you must specify a value or leave the specification
blank for each element.
Unions • Initial values cannot be specified. Always zero.
Enumerations • Initial values can be specified.