![Omron CVM1D Operation Manual Download Page 343](http://html1.mh-extra.com/html/omron/cvm1d/cvm1d_operation-manual_742532343.webp)
338
For the source data, the seconds are designated in bits 00 through 07 and the
minutes are designated in bits 08 through 15 of S. The hours are designated in
S+1. The maximum is thus 9,999 hours, 59 minutes, and 59 seconds.
The results are output to R and R+1. The maximum obtainable value is
35,999,999 seconds.
Precautions
S and S+1 must be BCD and must be in the proper hours/minutes/seconds for-
mat.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
S or S+1 are not BCD.
Number of seconds or minutes exceeds 59.
Content of
*
DM word is not BCD when set for BCD.
EQ (A50006):
ON when the result is 0.
Example
When 00000 is OFF (i.e., the execution condition is ON), the following instruc-
tion would convert the hours, minutes, and seconds given in D00100 and
D00101 to seconds and store the results in D00200 and D00201 as shown.
D00100
3
2
0
7
D00101
2
8
1
5
D00200
5
9
2
7
D00201
1
0
1
3
2,815 hrs, 32 min, 07 s
10,135,927 s
00000
LD NOT
000000
00001
SEC(143)
D00100
D00200
(143)
SEC
D00100
D00200
Address Instruction
Operands
0000
00
5-26-2 SECONDS TO HOURS: HMS(144)
(144)
HMS
S
R
R: 1
st
result word
CIO, G, A, DM
S: 1
st
source word CIO, G, A, T, C, #, DM
Operand Data Areas
Ladder Symbol
Variations
j
HMS(144)
Description
When the execution condition is OFF, HMS(144) is not executed. When the ex-
ecution condition is ON, HMS(144) converts time notation in seconds to an
equivalent time in hours/minutes/seconds.
The number of seconds designated in S and S+1 is converted to hours/minutes/
seconds and placed in R and R+1.
For the results, the seconds are placed in bits 00 through 07 and the minutes are
placed in bits 08 through 15 of R. The hours are placed in R+1. The maximum will
be 9,999 hours, 59 minutes, and 59 seconds.
Precautions
S+1 and S must be BCD and less than or equal to 3599 9999.
Note Refer to page 101 for general precautions on operand data areas.
Flags
ER (A50003):
S and/or S+1 do not contain BCD or exceed 35,999,999 s.
Content of
*
DM word is not BCD when set for BCD.
EQ (A50006):
ON when the result is 0.
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...