F47_BSUB2

Redundant instruction

NOTE

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

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

Example

  1. Example value 16#16 (BCD)

  2. Example value 16#4 (BCD)

  3. Result value 16#12 (BCD)

  4. Trigger: ON

Parameters

Input

s1 (WORD)

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

s2 (WORD)

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

Output

d (WORD)

Result, 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