Date and time instructions
873
Part III FP Instructions
F231_SEC_TO_DTBCD
Conversion of Seconds into Time Data
For a conversion from time data into seconds, please refer to F230_DTBCD_TO_SEC (see page
871).
Example:
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types Availability of F231_SEC_TO_DTBCD (see page 1323)
Variable Data type Function
s_SEC ANY32 Area in which the number of seconds are stored (32 bits)
d_DTBCD DTBCD Head area in which time data is stored
For Relay T/C Register Constant
s_SEC WX WY WR WL SV EV DT LD FL -
d_DTBCD - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
the specified address using the index
modifier exceeds a limit.
the number of seconds (s) >=
16#BC191380 (valid until 31 Dec. 2100
23:59:59).
the data memory of 'd' exceeds the area.
Description
This function converts a specified number of seconds into date and time. The time data is
calculated from 01/01/2001 at 00:00 hours.
Data types
Operands
Error flags