![background image](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532345.webp)
(145)
CADD D01000
D02000
D03000
0000
00
340
Example
When CIO 000000 is ON in the following example, the time data in D02000 and
D02001 is added to the calender data in D01000 through D01002 and output as
calender data to D03000 through D03002.
Address
Instruction
Operands
00000
LD
000000
00001
CADD(145)
D01000
D02000
D03000
90
07
28
18
40
30
1532
27
19
90
09
30
15
07
49
C + 2 : D01002
C + 1 : D01001
C : D01000
T + 1 : D02001
T : D02000
R + 2 : D03002
R + 1 : D03001
R : D03000
5-26-4 CALENDAR SUBTRACT: CSUB(146)
Variations
j
CSUB(146)
(146)
CSUB
C
T
R
T: 1
st
time word
CIO, G, A, T, C, #, DM
R: 1
st
result word
CIO, G, A, DM
C: 1
st
calendar word CIO, G, A, T, C, DM
Operand Data Areas
Ladder Symbol
Description
When the execution condition is OFF, CSUB(146) is not executed. When the ex-
ecution condition is ON, CSUB(146) subtracts the time in words T and T+1 from
the calendar data in words C, C+1, and C+2, and outputs the result to words R,
R+1, and R+2.
CSUB(146) (and the Calendar/Clock Area (G001 to G004)) corrects for leap
year.
The following table shows the format of calendar information. The format is the
same for the results output to R, R+1, and R+2.
Word
Bits
Contents
Possible values
C
00 to 07
Seconds
00 to 59
08 to 15
Minutes
00 to 59
C+1
00 to 07
Hours
00 to 23 (24-hour system)
08 to 15
Day of month
01 to 31 (adjusted by month and for leap year)
C+2
00 to 07
Month
01 to 12
08 to 15
Year
00 to 99 (Rightmost two digits of year)
The following table shows the format of the time information.
Word
Bits
Contents
Possible values
T
00 to 07
Seconds
00 to 59
08 to 15
Minutes
00 to 59
T+1
00 to 07
Hours
0000 to 9999
Time Instructions
Section 5-26
Summary of Contents for CVM1D
Page 462: ...SYSMAC CVM1D Duplex System Programmable Controllers Operation Manual Revised August 2001...
Page 463: ...iv...
Page 465: ...vi...