Htos (Hms To Sec) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

HTOS (HMS to Sec)

HTOS
*****
Valid Devices
Device
S1 (Source 1)
D1 (Destination 1)
For valid device address ranges, see "Device Addresses" on page 2-1.
Source device S1 occupies 3 consecutive data registers starting with the designated device.
Destination device D1 occupies 2 consecutive data registers to store double-word data, starting with the designated device.
Hour data can be 0 through 65,535. Minute and second data can be 0 through 59.
When any of the hour, minute, or second data exceeds the valid range, a user program execution error will result, turning on special internal relay
M8004 and the ERR LED on the FC6A Series MICROSmart. 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 "User Program Execution Errors" on page 3-10.
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.
Examples: HTOS
The following examples demonstrate the HTOS instruction that will convert time data in hours, minutes, and seconds into seconds
and store the results to two consecutive data registers.
HTOS
I0
D0
D1
D2
D0
D1
D2
Hours, minutes, seconds → Seconds
S1
D1
When input is on, time data in hours, minutes, and seconds assigned by source device S1 is
*****
converted into seconds. The result is stored to destination device D1.
Function
Time data in hours, minutes, seconds
Destination to store results
S1
D1
D0
D100
Source 1
2
(Hour)
10
(Minute)
40
(Second)
Source 1
40
(Hour)
30
(Minute)
20
(Second)
FC6A S
MICROS
ERIES
I
Q
Destination 1
D100·D101
Destination 1
D100·D101
L
P
MART
ADDER
ROGRAMMING
24: C
M
R
T
C
D
P
X
X
7840
(Second)
145820
(Second)
M
FC9Y-B1726
ANUAL
I
LOCK
NSTRUCTIONS
Constant
Repeat
24-9

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents