F48_DBSUB2

Redundant instruction

NOTE

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

Subtracts the 8-digit BCD equivalent constant or 8-digit BCD data specified by s2 from the 8-digit BCD equivalent constant or 8-digit BCD data specified by s1 if the trigger EN is in the ON-state. The result is stored in d.

Parameters

Input

s1 (DWORD)

Minuend, 32-bit area for 8-digit BCD data or equivalent constant

s2 (DWORD)

Subtrahend, 32-bit area for 8-digit BCD data or equivalent constant

Output

d (DWORD)

Result, 32-bit area for 8-digit BCD data

Example

  1.  (1) Example value 16#33555588 (BCD)
  2.  (2) Example value 16#00110022 (BCD)
  3.  (3) Result value 16#33445566 (BCD)
  4.  (4) 32-bit area
  5.  (5) Trigger: ON

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 8-digit BCD data (overflow).

Related topics:

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