Download Print this page

Converting Time Data From Hour/Minute/Second To Seconds In 16 Bits - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Converting time data from hour/minute/second to seconds in 16
bits
HTOS(P)
These instructions convert the time data stored in the device numbers starting from (s) to the time value in seconds, and store
the converted data in the device numbers starting from (d) as 16-bit binary.
Ladder diagram
(s)
FBD/LD
EN
ENO
s
d
Setting data
■Descriptions, ranges, and data types
Operand
Description
(s)
Head device number where the clock data before conversion is
stored
(d)
Head device number where the clock data after conversion is
stored
EN
Execution condition
ENO
Execution result
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
Processing details
• These instructions convert the time data stored in the device numbers starting from (s) to the time value in seconds, and
store the converted data in the device numbers starting from (d).
(s)
hour
(0 to 9)
(s)+1
minute
(0 to 59)
second
(0 to 59)
(s)+2
Ex.
When specifying 4 hours 29 minutes 31 seconds in (s)
(s)
4
29
(s)+1
31
(s)+2
8 APPLICATION INSTRUCTION
694
8.24 Clock Instruction
(d)
Word
T, ST, C, D, W,
SD, SW, R
(d)
second
(d)
16171
Structured text
ENO:=HTOS(EN,s,d);
ENO:=HTOSP(EN,s,d);
Range
Double word Indirect
U\G
Z
LC
Data type
16-bit signed binary
16-bit signed binary
Bit
Bit
Constant
specification
LZ
K, H
Data type (label)
ANY16_ARRAY
(Number of elements: 3)
ANY16
BOOL
BOOL
Others
E
$

Hide quick links:

Advertisement

loading