Date and time instructions
872
Part III FP Instructions
F230_DTBCD_TO_
SEC
Time Data Conversion into Seconds
For a conversion from seconds into time data, please refer to F231_SEC_TO_DTBCD (see page
872).
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 F230_DTBCD_TO_SEC (see page 1323)
Variable Data type Function
s_DTBCD DTBCD Area in which the input time data is stored
d_SEC ANY32 Area in which the converted second information is stored (32
bits)
For Relay T/C Register Constant
s_DTBCD WX WY WR WL SV EV DT LD FL -
d_SEC - 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.
values other than BCD are specified for
's'.
the value which exceeds the range in the
time data of 's' is specified.
Description
This function converts time data (date and time) into the number of seconds. It calculates the time
span between the specified time date and 01/01/2001 at 00:00 hours. The time data is specified in
the DUT "DTBCD".
Data types
Operands
Error flags