Clock/Calendar Instructions; Date (Date) - Automation Direct DL05 User Manual

Micro plc
Hide thumbs Also See for DL05:
Table of Contents

Advertisement

Clock/Calendar Instructions

Date (DATE)

The Date instruction can be used to set the date in the
Memory Cartridge. 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 four consecutive V-memory
locations (V7771–V7774).
Year
Month
Day of Month
Day of Week
The values entered for the day of week are:
0=Sunday, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday, 6=Saturday
Operand Data Type
V-memory
In the following example, when C0 is on, the constant value (K00010301) is loaded into the
accumulator using the Load Double instruction (C0 can 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. The
example loads the date January 3, 2000.
DirectSOFT
C0
Handheld Programmer Keystrokes
STR
SHFT
0
OUT
SHFT
Date
1970-2069
1-12
1-31
0-06
A
V
All (See page 10-9)
0
LDD
K00010301
0
Acc.
Load the constant
value (K00010301)
into the accumulator
Acc. 0
OUTD
V2000
Copy the value in
0
the accumulator to
V2000 and V2001
DATE
V2000
Set the date in the CPU
using the value in V2000
and V2001
C
0
ENT
L
D
D
3
0
1
ENT
SHFT
D
V
D
A
T
E
DL05 Micro PLC User Manual, 6th Edition, Rev. A
Chapter 10: Memory Cartridge
V-Memory Location (BCD)
Range
V7774
V7773
V7772
V7771
DL05 Range
aaa
Constant (K)
In
this
0
0
1
0
3
0
1
instruction uses the value set in
V2000 and V2001 to set the date
in the appropriate V memory
0
0
1
0
3
0
1
locations (V7771–V7774). The
year is entered as a two digit
number, but it is converted
0
0
1
0
3
0
1
internally to a four digit number.
Two digit values ranging between
70 – 99 are converted to 1970 –
0
0
1
0
3
0
1
1999. Values of 00 – 69 are
V2001
V2000
converted to 2000 – 2069.
V2001
0
0
0
1
0
Format
Year
Month
K
0
0
0
2
0
0
0
V
2
0
DATE
V aaa
(READ Only)
example,
the
Date
V2000
3
0
1
Day
Day of Week
1
ENT
0
0
ENT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
10–13

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DL05 and is the answer not in the manual?

Table of Contents