Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 397

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

3. Instructions
–BC/–BCL
Instruction
BCD SUBTRACT WITH
CARRY
DOUBLE BCD SUBTRACT
WITH CARRY
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
–BC: Minuend word
Mi
–BCL: First minuend word
–BC: Subtrahend word
Su
–BCL: First subtrahend word
–BC: Result word
R
–BCL: First result word
Operand Specifications
Area
CIO
WR
HR
MI, Su
–BC
OK
OK
OK
R
Mi, Su
–BCL
OK
OK
OK
R
Flags
Name
Error Flag
ER
Equals Flag
=
Carry Flag
CY
360
Mnemonic
Variations
–BC
@–BC
–BCL
@–BCL
–BC
–BC(416)
Mi
Mi: Minuend word
Su
Su: Subtrahend word
R: Result word
R
Block program areas
Step program areas
OK
OK
Description
Word addresses
AR
T
C
DM
EM
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
Label
• ON when Mi is not BCD.
• ON when Su is not BCD.
• OFF in all other cases.
• ON when the result is 0.
• OFF in all other cases.
• ON when the subtraction results in a borrow.
• OFF in all other cases.
Function
code
Subtracts 4-digit (single-word) BCD data and/or
416
constants with the Carry Flag (CY).
Subtracts 8-digit (double-word) BCD data and/or
417
constants with the Carry Flag (CY).
Subroutines
OK
Data type
–BC
–BCL
WORD
DWORD
WORD
DWORD
WORD
DWORD
Indirect
DM/EM
Con-
addresses
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
OK
---
OK
OK
OK
---
---
Operation
–BC
• ON when Mi and/or Mi +1 are not BCD.
• ON when Su and/or Su +1 are not BCD.
• OFF in all other cases.
• ON when the result is 0.
• OFF in all other cases.
• ON when the subtraction results in a borrow.
• OFF in all other cases.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
–BCL
–BCL(417)
Mi: 1st minuend word
Mi
Su
Su: 1st subtrahend word
R
R: 1st result word
SFC action or
Interrupt tasks
transition programs
OK
OK
Size
–BC
–BCL
1
1
1
Registers
Pulse
TK
CF
bits
Indirect
IR
using IR
---
OK
---
---
---
---
OK
---
---
---
–BCL
2
2
2
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents