Skip to main content

Hour Conversion

Instruction Parameters

Supported PLC Series

XPnA/1RXPnBXPnEXPnFCP3A/B/P/U
CP4A~D/U
CPnECPnFBPPLC-S

Supported Data Registers

MXYKLFTCSZRQD@DConstant
S---
D-----

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1-
CarryF11.2-

Number of Steps

Steps
3

Operands

OperandDescription
SThe first operand.
Entries are DWORD data registers or constants.
The value range 0 ~ 86,399.
DThe second operand.
Entries are only WORD data registers.
This is where the conversion between seconds to hours is saved.
This requires 3 data registers.

Notice

Error Flag (F11.0) Notice

The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.

F11.0 turns ON when the value of the data for converting exceeds the data register assigned to D.

Data Register Format

The second-format data is formatted as follows when converted:

  • The value from S is converted and saved into the data register D:
    • D: Hour (0 ~ 23)
    • D+1: Minute (0 ~ 59)
    • D+2: Second (0 ~ 59)

Examples