FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
24-9
24: C
LOCK
I
NSTRUCTIONS
HTOS (HMS to Sec)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
Source device S1 occupies 3 consecutive data registers starting with the designated device. Data registers D0-D997 and D1000-D1997 can be
designated as source device S1.
Destination device D1 occupies 2 consecutive data registers to store double-word data, starting with the designated device. Data registers D0-D998
and D1000-D1998 can be designated as destination device D1.
Hour data can be 0 through 65535. Minute and second data can be 0 through 59.
When any of the hour, minute, or second data is out of the valid range, a user program execution error will result, turning on special internal relay
M8004 and the ERR LED on the CPU module. When a user program execution error occurs, the execution of the instruction is canceled and the next
instruction is executed.
When the execution of the instruction is canceled, the data in D1 and D1+1 is left unchanged. For details about the user program execution errors,
see Chapter 4 “User Program Execution Errors” on page 4-21.
Since the HTOS instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used as required.
Examples: HTOS
The following examples demonstrate the HTOS instruction to convert time data in hours, minutes, and seconds into seconds and
store the results to two consecutive data registers.
Hours, minutes, seconds
Seconds
When input is on, time data in hours, minutes, and seconds designated by source device S1 is
converted into seconds. The result is stored to destination device D1.
S1
*****
D1
*****
HTOS
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
Time data in hours, minutes, seconds
—
—
—
—
—
—
X
—
—
D1 (Destination 1)
Destination to store results
—
—
—
—
—
—
X
—
—
7840
D100·D101
(Second)
Destination 1
I0
D1
D100
S1
D0
HTOS
Source 1
2
D0
(Hour)
10
D1 (Minute)
40
D2 (Second)
Source 1
40
D0
(Hour)
30
D1 (Minute)
20
D2 (Second)
145820
D100·D101
(Second)
Destination 1
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...