DL205 User Manual, 4th Edition, Rev. B
5–175
Chapter 5: Standard RLL Instructions - Clock/Calendar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Clock/Calendar Instructions
Date (DATE)
The Date instruction can be used to set the date in the CPU.
The instruction requires two consecutive V-memory locations
(Vaaa) to set the date. If the values in the specified locations are
not valid, the date will not be set. The current date can be read
from 4 consecutive V-memory locations (V7771–V7774).
In the following example, when C0 is on, the constant value (K94010301) is loaded into the
accumulator using the Load Double instruction (C0 should be a contact from a one shot
(PD) instruction). The value in the accumulator is output to V2000 using the Out Double
instruction. The Date instruction uses the value in V2000 to set the date in the CPU.
Operand Data Type DL250-1 Range DL260 Range
aaa aaa
V-memory V All (See page 3 - 55) All (See page 3 - 56)
Date Range
V-memory Location (BCD)
(READ Only)
Year
0-99 V7774
Month
1-12 V7773
Day
1-31 V7772
Day of Week
0-06 V7771
The values entered for the day of week are:
0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday.
V2000
Acc.
0301
0301
9401 0301
9401
V2001
9401
Acc.
9401 0301
03019401
V2001 V2000
DirectSOFT
C0
LDD
K94010301
OUTD
V2000
DATE
V2000
Constant (K)
In this example, the Date
instruction uses the value set in
V2000 and V2001 to set the date
in the appropriate V memory
locations (V7771-V7774).
Format
Year Month Day Day of Week
Handheld Programmer Keystrokes
0
A
ENT
1
B
4
E
0
A
0
A
ENT
STR
$
SHFT
ANDST
L
3
D
SHFT
MLR
T
3
D
OUT
GX
SHFT
3
D
NEXT NEXT NEXT NEXT
2
C
ENT
PREV
0
A
9
J
0
A
3
D
1
B
0
A
ENT
0
A
3
D
0
A
4
E
0
A
2
C
ENT
0
A
0
A
Load the constant
value (K94010301)
into the accumulator
Copy the value in
the accumulator to
V2000 and V2001
Set the date in the CPU
using the value in V2000
and 2001
DS Used
HPP Used