Clock/Calendar Instructions
Date (DATE)
The Date instruction can be used to set the date in the CPU.
230
The instruction requires two consecutive V-memory locations
240
(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
250-1
from 4 consecutive V-memory locations (V7771–V7774).
260
DS
Used
Year
HPP Used
Month
Day
Day of Week
0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday.
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.
DirectSOFT
C0
Handheld Programmer Keystrokes
$
STR
L
SHFT
ANDST
A
D
0
GX
SHFT
OUT
D
SHFT
Chapter 5: Standard RLL Instructions - Clock/Calendar
Date
The values entered for the day of week are:
Operand Data Type
V-memory
V
9
LDD
K94010301
9
Load the constant
Acc.
value (K94010301)
into the accumulator
Acc. 9
OUTD
V2000
Copy the value in
9
the accumulator to
V2000 and V2001
DATE
V2000
Set the date in the CPU
using the value in V2000
and 2001
A
NEXT
NEXT
NEXT
NEXT
D
D
J
PREV
3
3
A
B
ENT
3
0
1
D
C
A
A
3
2
0
A
T
E
C
3
0
MLR
4
V-memory Location (BCD)
Range
(READ Only)
0-99
1-12
1-31
0-06
DL250-1 Range
DL260 Range
aaa
All (See page 3 - 55)
All (See page 3 - 56)
Constant (K)
4
0
1
0
3
0
1
In this example, the Date
instruction uses the value set in
V2000 and V2001 to set the date
4
0
1
0
3
0
1
in the appropriate V memory
locations (V7771-V7774).
4
0
1
0
3
0
1
4
0
1
0
3
0
1
V2001
V2000
Format
V2001
9
4
0
1
0
Year
Month
ENT
0
E
A
B
ENT
9
4
0
1
A
ENT
0
0
A
A
A
ENT
2
0
0
0
DL205 User Manual, 4th Edition, Rev. B
DATE
V aaa
V7774
V7773
V7772
V7771
aaa
V2000
3
0
1
Day Day of Week
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–175
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?