13. Program Support Functions
13.5 User Macro Specifications
351
Time reading variables
The following operations can be carried out using the system variable extension for the user macro
time.
(1) By adding time information system variable #3011 and #3012, the current date (#3011) and
current time (#3012) can be read and written.
(2) By adding parameter #1273/bit1, the unit (millisecond unit/hour unit) of the cumulative time
during system variable #3002 automatic start can be changed.
Variable No.
Details
#3001
The cumulative time during power ON can be read and the value can be
substituted.
The unit is a millisecond unit.
#3002
The cumulative time during automatic start can be read and the value can
be substituted.
The unit can be changed between millisecond and hour with parameter
#1273/bit1.
#3011
The current date can be read and written.
YYYY/MM/DD is read as a YYYYMMDD value.
When a YYYYMMDD value is written in, it will be set as YY/MM/DD (the
last two digits of the year are displayed).
Command range for year/month/date setting
Year (YYYY) : 2000 to 2099
Month (MM) : 1 to 12
Date (DD)
: 1 to maximum number of days in month
#3012
The current time can be read and written.
HH/MM/SS is read as a HHMMSS value.
When an HHMMSS value is written in, it will be set as HH/MM/DD.
Command range for hour/minute/second setting
Hour (HH)
: 0 to 23 (24-hour system)
Minute (MM) : 0 to 59
Second (SS) : 0 to 59
(3) The cumulative time returns to 0 at approx. 2.44 × 10
11
milliseconds (approx. 7.7 years).
(4) If a negative value or a value exceeding 244335917226 milliseconds (67871.08811851 hours
for #3002 time designation) is set for the cumulative time, a program error (P35) will occur.
(5) If a value exceeding the command range is set for the date or time, a program error (P35) will
occur.
(6) Always set the month/date/hour/minute/second as a two-digit value when setting the date and
time.
If the value only has one digit, always add 0. (February 14, 2001
⇒
#3001= 20010214 ;, etc.)