278
Conversion Instructions Section 5-19
1035 is less than the lower limit specified in DM 0004, so the lower limit is writ-
ten to DM 0100.)
5-19-13HOURS-TO-SECONDS – SEC(––)
Limitations This instruction is available in the CQM1 only.
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.
Description 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.
Flags 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.
CLC(41)
STC(40)
00100
Address Instruction Operands
00000 LD 25313
00001 CLC(41)
00002 LD 00101
00101 STC(40)
00004 LD 00100
00005 SCL3(– –)
LR 02
DM 0000
DM 0100
25313
(Always ON)
00101
@SCL3(– –)
DM 0000
LR 02
DM 0100
DM 0000 0005
DM 0001 0003
DM 0002 0006
DM 0003 07FF
DM 0004 F800
LR 02 0100
DM 0100 00CD
0005
3
6
CY=0
BCD
Signed hex.
LR 02 1035
DM 0100 F800
CY=1
S: Beginning source word (BCD)
IR, SR, AR, DM, HR, TC, LR
R: Beginning result word (BCD)
IR, SR, AR, DM, HR, TC, LR
Ladder Symbols
Operand Data Areas
000: No function
000
SEC(––)
S
R
000
@SEC(––)
S
R
000