926
Clock Instructions Section 3-26
Description SEC(065) converts the 8-digit BCD hours/minutes/seconds data in S and S+1
to 8-digit BCD seconds-only data and outputs the result to D and D+1.
Flags
Precautions The maximum value for the source data is 9,999 hours, 59 minutes, and 59
seconds (35,999,999 seconds).
Examples When CIO 0.00 turns ON in the following example, the hours/minutes/sec-
onds data in D200 and D201 (34 hours, 17 minutes, and 36 seconds) is con-
verted to seconds-only data and the result is output to D100 and D101.
DM Area D0 to D32766
Indirect DM addresses
in binary
@ D0 to @ D32767
Indirect DM addresses
in BCD
*D0 to *D32767
Constants Specified values only ---
Data Registers ---
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area S D
Hours
Seconds
Minutes Seconds
Name Label Operation
Error Flag ER ON if the minutes data in S (bits 08 to 15) is not BCD and in
the range 00 to 59.
ON if the seconds data in S (bits 00 to 07) is not BCD and in
the range 00 to 59.
OFF in all other cases.
Equals Flag = ON if the content of D is 0000 after the operation.
OFF in all other cases.
0.00
D200
D100
S: D200
D201
D: D100
D101
seconds
17 minutes, 36 seconds
34 hours
Hours/minutes/seconds
123,456 seconds
→