Panasonic FP Series Programming Manual page 351

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Arithmetic instructions
F40_BADD
The 4-digit BCD equivalent constant or 16-bit area for 4-digit BCD data specified by s and the
Description
16-bit area for 4-digit BCD data specified by d are added together if the trigger EN is in the
ON-state. The result is stored in d.
Example value 16#2111 (BCD)
Bit
15 . . 12 10 . . 8 7 . . 4 3 . . 0
d
16# (BCD)
Example value 16#0011 (BCD)
Bit
15 . . 12 10 . . 8 7 . . 4 3 . . 0
s
16# (BCD)
Result value 16#2122 (BCD) if trigger is ON
Bit
15 . . 12 10 . . 8 7 . . 4 3 . . 0
d
16# (BCD)
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.
When this instruction is used, the area for the augend d is overwritten by the
added result. If you want to avoid the overwrite, we recommend using the
instruction F41_DBADD (see page 351).
Availability of F40_BADD (see page 1325)
PLC types
Data types
Variable
Data type
WORD
s
WORD
d
350
4-digit BCD addition
0 0 1 0
0 0 0 1
0 0 0 1
0 0 0 1
2
1
1
0 0 0 0
0 0 0 0
0 0 0 1
0 0 0 1
0
0
1
0 0 1 0
0 0 0 1
0 0 1 0
0 0 1 0
2
1
2
Function
addend, 16-bit area for 4-digit BCD data or equivalent
constant
augend and result, 16-bit area for 4-digit BCD data
1
1
2

Advertisement

Table of Contents
loading

Table of Contents