F42_BADD2

Redundant instruction

NOTE

This is a redundant instruction. It is replaced by: FP_ADD_BCD

The 4-digit BCD equivalent constants or 16-bit areas for 4-digit BCD data specified by s1 and s2 are added together if the trigger EN is in the ON-state. The result is stored in d.

Example

  1.  (1) Example value 16#4321 (BCD)
  2.  (2) Example value 16#1234 (BCD)
  3.  (3) Result value 16#5555 (BCD) if trigger is ON

Parameters

Input

s1 (WORD)

Augend, 16-bit area for 4-digit BCD data or equivalent constant

s2 (WORD)

Addend, 16-bit area for 4-digit BCD data or equivalent constant

Output

d (WORD)

Sum, 16-bit area for 4-digit BCD data

Error flags

sys_bIsEqual (turns to TRUE for one scan)

if the calculated result is 0.

sys_bIsCarry (turns to TRUE for one scan)

if the result exceeds the range of 4-digit BCD data (overflow).

Related topics:

Modified on: 2019-01-24Feedback on this pagePanasonic hotline