Hours-To-Seconds - Sec - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Conversion Instructions
5-20-13 HOURS-TO-SECONDS – SEC(––)
Limitations
Description
Flags
Example
00000
HR 12
3
HR 13
2
DM 0100
5
DM 0101
1
Ladder Symbols
SEC(−−)
S
R
000
S and S+1 must be within the same data area. R and R+1 must be within the
same data area. S and S+1 must be BCD and must be in the proper hours/
minutes/seconds format.
DM 6143 to DM 6655 cannot be used for R.
SEC(––) is used to convert time notation in hours/minutes/seconds to an
equivalent in just seconds.
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 result is output to R and R+1. The maximum obtainable value is
35,999,999 seconds.
ER:
S and S+1 or R and R+1 are not in the same data area.
S and/or S+1 do not contain BCD.
Number of seconds and/or minutes exceeds 59.
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
EQ:
ON when the result is zero.
When 00000 is OFF (i.e., when the execution condition is ON), the following
instruction would convert the hours, minutes, and seconds given in HR 12 and
HR 13 to seconds and store the results in DM 0100 and DM 0101 as shown.
2
0
7
2,815 hrs, 32 min,
07 s
8
1
5
9
2
7
10,135,927 s
0
1
3
@SEC(−−)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
S
R
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
000
Address Instruction
SEC(−−)
00000
HR 12
00001
DM 0100
000
Section 5-20
Operand Data Areas
S: Beginning source word (BCD)
R: Beginning result word (BCD)
000: No function
000
Operands
LD NOT
00000
SEC(−−)
HR
DM
12
0100
000
311

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents