7 APPLICATION INSTRUCTIONS
7.15 Clock Instructions
693
7
Time data conversion (from second to hour/minute/second)
HOUR(P)
• Converts the data in seconds stored in the device number designated by (S) to an hour/minute/second format, and stores
the conversion result into the area starting from the device designated by (D).
For example, if 45325 seconds were the value designated, the conversion operation would be conducted as follows:
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
(S): Head number of the devices where clock data before conversion is stored (BIN 32 bits)
(D): Head number of the devices where the clock data after conversion will be stored (BIN 16 bits)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
(S)
(D)
Error
code
Error details Q00J/
Q00/
Q01
QnH QnPH QnPRH QnU LCPU
4100 The value set for (S) is not within the setting range.
4101 The range of the devices specified by (S) or (D) has exceeded the range of
the corresponding devices.
Basic
Process
High
performance
Redundant
Universal
LCPU
Command
Command
HOURP
S
D
S D
HOURP
HOUR
HOUR
Second
Hour
Minute
Second
(0 to 23)
(0 to 59)
(0 to 59)
(0 to 86399)
S
D
D
D
S
Data range Data range
1
+1
+2