Panasonic FP Series Programming Manual page 869

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Date and time instructions
F157_ADD_DTBCD
_TIMEBCD
The date/clock data (3 words) specified by s1_DTBCD and the time data (2 words) specified by
Description
s2_TIMEBCD are added together if the trigger EN is in the ON-state. The result is stored in the
area (3 words, same format as s1_DTBCD) specified by d_DTBCD. This instruction handles all
data in BCD format.
Example:
You cannot specify special data registers DT9054 to DT9056 (DT90054 to DT90056
for FP2/2SH and FP10/10S/10SH) for the operand d_DTBCD. These registers are
factory built-in calendar timer values. To change the built-in calendar timer value,
first store the added result in other memory areas and transfer them to the
special data registers using SET_RTC_DTBCD (see page 874) instruction.
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.
Example 1: clock/calendar data in
DTBCD format
August 1, 1992, Time: 14:23:31
(hours:minutes:seconds)
Example 2: time data in TIMEBCD
format
32 hours; 50 minutes; and 45 seconds
Availability of F157_ADD_DTBCD_TIMEBCD (see page 1321)
PLC types
868
Time addition
DUT
Member
MinSec
DayHour
YearMon
Result
16#2331 (minutes/seconds)
16#0114 (day/hour)
16#9208 (year/month)
16#00325045 hex
(hours/minutes/seconds)

Advertisement

Table of Contents
loading

Table of Contents