![background image](http://html1.mh-extra.com/html/omron/sysmac-c200hs/sysmac-c200hs_operation-manual_742436193.webp)
183
5-18-5
HOURS-TO-SECONDS – SEC(65)
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
---: Not used.
SEC(65)
S
R
---
@SEC(65)
S
R
---
Limitations
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/minu-
tes/seconds format.
Description
SEC(65) is used to convert time notation in hours/minutes/seconds to an equiv-
alent in just seconds.
For the source data, the seconds is designated in bits 00 through 07 and the min-
utes is designated in bits 08 through 15 of S. The hours is 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.
Indirectly addressed DM word is non-existent. (Content of
∗
DM word is
not BCD, or the DM area boundary has been exceeded.)
EQ:
Turns ON when the result is zero.
Example
When 00000 is OFF (i.e., when the execution condition is ON), the following in-
struction 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.
SEC(65)
HR 12
DM 0100
000
00000
HR 12
3
2
0
7
HR 13
2
8
1
5
DM 0100
5
9
2
7
DM 0101
1
0
1
3
2,815 hrs, 32 min, 07 s
10,135,927 s
Address
Instruction
Operands
00000
LD NOT
00000
00001
SEC(65)
HR
12
DM
0100
000
Data Conversion
Section 5-18
Содержание SYSMAC C200HS
Страница 1: ...Cat No W235 E1 05 C200HS SYSMAC Programmable Controllers...
Страница 2: ...C200HS Programmable Controllers Operation Manual Revised February 2002...
Страница 3: ...iv...
Страница 5: ...vi...
Страница 379: ...371 SR word Corresponding key s Bit 279 03 04 05 3 06 07 VER 08 09 Monitoring Operation and Modifying Data Section 7 1...
Страница 470: ...468 Programmer Program Date Page Word Contents Notes Word Contents Notes Data Storage...
Страница 471: ...469 Programmer Program Date Page TC address T or C Set value Notes TC address T or C Set value Notes Timers and Counters...